Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/150286
Change subject: Avoid disabling deselection of text with a tap ...................................................................... Avoid disabling deselection of text with a tap We were running event.preventDefault() on touchend when tapping on non-links. This had the side effect of breaking the automatic handling of deselection of selected text when tapping. Doesn't seem to be a need to prevent default behavior here, so took it out. Bug: 68681 Change-Id: I3579c045d2021ad30f67c04c9ec0c7f76b1a79fc --- M wikipedia/assets/bundle.js M www/js/listeners.js 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/86/150286/1 diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index f0f7d23..bae0d4f 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -270,7 +270,8 @@ } else { var anchorTarget = findParent(event.target, 'A'); if ( anchorTarget && (anchorTarget.tagName != "A") ) { - event.preventDefault(); + // Do NOT prevent default behavior -- this is needed to for instance + // handle deselection of text. bridge.sendMessage( 'nonAnchorTouchEndedWithoutDragging', { id: event.target.getAttribute( "id" ), tagName: event.target.tagName}); } } diff --git a/www/js/listeners.js b/www/js/listeners.js index a2fef82..9c31409 100644 --- a/www/js/listeners.js +++ b/www/js/listeners.js @@ -174,7 +174,8 @@ } else { var anchorTarget = findParent(event.target, 'A'); if ( anchorTarget && (anchorTarget.tagName != "A") ) { - event.preventDefault(); + // Do NOT prevent default behavior -- this is needed to for instance + // handle deselection of text. bridge.sendMessage( 'nonAnchorTouchEndedWithoutDragging', { id: event.target.getAttribute( "id" ), tagName: event.target.tagName}); } } -- To view, visit https://gerrit.wikimedia.org/r/150286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3579c045d2021ad30f67c04c9ec0c7f76b1a79fc Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER <br...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits