{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/756","labels_url":"https://api.github.com/repos/facebook/react-native/issues/756/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/756/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/756/events","html_url":"https://github.com/facebook/react-native/issues/756","id":67196235,"number":756,"title":"NSRange Exception with onPress on Text","user":{"login":"rogergl","id":98088,"avatar_url":"https://avatars.githubusercontent.com/u/98088?v=3","gravatar_id":"","url":"https://api.github.com/users/rogergl","html_url":"https://github.com/rogergl","followers_url":"https://api.github.com/users/rogergl/followers","following_url":"https://api.github.com/users/rogergl/following{/other_user}","gists_url":"https://api.github.com/users/rogergl/gists{/gist_id}","starred_url":"https://api.github.com/users/rogergl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogergl/subscriptions","organizations_url":"https://api.github.com/users/rogergl/orgs","repos_url":"https://api.github.com/users/rogergl/repos","events_url":"https://api.github.com/users/rogergl/events{/privacy}","received_events_url":"https://api.github.com/users/rogergl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"a2","id":241156,"avatar_url":"https://avatars.githubusercontent.com/u/241156?v=3","gravatar_id":"","url":"https://api.github.com/users/a2","html_url":"https://github.com/a2","followers_url":"https://api.github.com/users/a2/followers","following_url":"https://api.github.com/users/a2/following{/other_user}","gists_url":"https://api.github.com/users/a2/gists{/gist_id}","starred_url":"https://api.github.com/users/a2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a2/subscriptions","organizations_url":"https://api.github.com/users/a2/orgs","repos_url":"https://api.github.com/users/a2/repos","events_url":"https://api.github.com/users/a2/events{/privacy}","received_events_url":"https://api.github.com/users/a2/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-04-08T19:00:57Z","updated_at":"2015-04-09T08:54:13Z","closed_at":null,"body":"The following code worked in 0.3.4 but stopped working with any newer version:\r\n ```html\r\n <TouchableHighlight style={styles.button}\r\n                                  underlayColor='#99d9f4'>\r\n                <Text style={styles.buttonText}\r\n                      onPress={this._onSync.bind(this)}\r\n                    >Sync</Text>\r\n</TouchableHighlight>\r\n```\r\n\r\nThe problem is the onPress handler on the Text element. It works if the onPress handler is moved to the TouchableHighlight element.\r\n\r\nBTW: the stack trace is\r\n```\r\n(\r\n\t0   CoreFoundation                      0x000000010c950a75 __exceptionPreprocess + 165\r\n\t1   libobjc.A.dylib                     0x000000010c1dbbb7 objc_exception_throw + 45\r\n\t2   CoreFoundation                      0x000000010c9509ad +[NSException raise:format:] + 205\r\n\t3   UIFoundation                        0x00000001143adc8f _NSBlockNumberForIndex + 84\r\n\t4   UIFoundation                        0x000000011436ce27 -[NSLayoutManager(NSPrivate) _invalidateGlyphsForExtendedCharacterRange:changeInLength:includeBlocks:] + 786\r\n\t5   UIFoundation                        0x000000011439a692 -[NSLayoutManager _invalidateGlyphsForCharacterRange:editedCharacterRange:changeInLength:actualCharacterRange:] + 176\r\n\t6   UIFoundation                        0x000000011439c934 -[NSLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:] + 208\r\n\t7   UIFoundation                        0x00000001143c30ba -[NSTextStorage _notifyEdited:range:changeInLength:invalidatedRange:] + 152\r\n\t8   UIFoundation                        0x00000001143c2bf2 -[NSTextStorage processEditing] + 367\r\n\t9   UIFoundation                        0x00000001143c2a4c -[NSTextStorage edited:range:changeInLength:] + 305\r\n\t10  Foundation                          0x000000010bd852f8 -[NSConcreteMutableAttributedString replaceCharactersInRange:withAttributedString:] + 330\r\n\t11  UIFoundation                        0x00000001143c4919 -[NSConcreteTextStorage replaceCharactersInRange:withAttributedString:] + 78\r\n\t12  AwesomeProject                      0x000000010ae7050a -[RCTText setAttributedText:] + 106\r\n\t13  AwesomeProject                      0x000000010ae6f7d9 __55-[RCTTextManager uiBlockToAmendWithShadowViewRegistry:]_block_invoke_2 + 201\r\n\t14  AwesomeProject                      0x000000010aca57e3 __45-[RCTSparseArray enumerateObjectsUsingBlock:]_block_invoke + 147\r\n\t15  CoreFoundation                      0x000000010c891ec6 __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 102\r\n\t16  CoreFoundation                      0x000000010c891dcc -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204\r\n\t17  AwesomeProject                      0x000000010aca570f -[RCTSparseArray enumerateObjectsUsingBlock:] + 415\r\n\t18  AwesomeProject                      0x000000010ae6f6c0 __55-[RCTTextManager uiBlockToAmendWithShadowViewRegistry:]_block_invoke + 208\r\n\t19  AwesomeProject                      0x000000010ae6fabb __55-[RCTTextManager uiBlockToAmendWithShadowViewRegistry:]_block_invoke137 + 443\r\n\t20  AwesomeProject                      0x000000010acd2dcc __27-[RCTUIManager addUIBlock:]_block_invoke + 124\r\n\t21  AwesomeProject                      0x000000010acdbd16 __29-[RCTUIManager flushUIBlocks]_block_invoke + 342\r\n\t22  libdispatch.dylib                   0x000000010f38d186 _dispatch_call_block_and_release + 12\r\n\t23  libdispatch.dylib                   0x000000010f3ac614 _dispatch_client_callout + 8\r\n\t24  libdispatch.dylib                   0x000000010f394a1c _dispatch_main_queue_callback_4CF + 1664\r\n\t25  CoreFoundation                      0x000000010c8b8749 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\r\n\t26  CoreFoundation                      0x000000010c87b62b __CFRunLoopRun + 2043\r\n\t27  CoreFoundation                      0x000000010c87abc6 CFRunLoopRunSpecific + 470\r\n\t28  GraphicsServices                    0x000000010fe2ea58 GSEventRunModal + 161\r\n\t29  UIKit                               0x000000010dfc9580 UIApplicationMain + 1282\r\n\t30  AwesomeProject                      0x000000010ac4c193 main + 115\r\n\t31  libdyld.dylib                       0x000000010f3e1145 start + 1\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/91156687","html_url":"https://github.com/facebook/react-native/issues/756#issuecomment-91156687","issue_url":"https://api.github.com/repos/facebook/react-native/issues/756","id":91156687,"user":{"login":"LengBinBin","id":6848970,"avatar_url":"https://avatars.githubusercontent.com/u/6848970?v=3","gravatar_id":"","url":"https://api.github.com/users/LengBinBin","html_url":"https://github.com/LengBinBin","followers_url":"https://api.github.com/users/LengBinBin/followers","following_url":"https://api.github.com/users/LengBinBin/following{/other_user}","gists_url":"https://api.github.com/users/LengBinBin/gists{/gist_id}","starred_url":"https://api.github.com/users/LengBinBin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LengBinBin/subscriptions","organizations_url":"https://api.github.com/users/LengBinBin/orgs","repos_url":"https://api.github.com/users/LengBinBin/repos","events_url":"https://api.github.com/users/LengBinBin/events{/privacy}","received_events_url":"https://api.github.com/users/LengBinBin/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T08:54:13Z","updated_at":"2015-04-09T08:54:13Z","body":"+1. Got the same issue `_NSBlockNumberForIndex` on click the cell in demo project."}}