Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/72631
Change subject: Bug 50680: Use mouseup rather than keyup to open search overlay
......................................................................
Bug 50680: Use mouseup rather than keyup to open search overlay
Keyup seems to work on both Windows Phone 7 and 8
If statement and waiting for keydown seems unncessary. the focus
via a mouseup or touchend is enough
Bug: 50680
Change-Id: Iab1de24c21d1f937a793830ec23d90ab5c30f9a2
---
M javascripts/modules/search-2.js
1 file changed, 2 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/31/72631/1
diff --git a/javascripts/modules/search-2.js b/javascripts/modules/search-2.js
index 776eb10..22aff37 100644
--- a/javascripts/modules/search-2.js
+++ b/javascripts/modules/search-2.js
@@ -116,11 +116,8 @@
function init() {
// don't use focus event
(https://bugzilla.wikimedia.org/show_bug.cgi?id=47499)
- $( '#searchInput' ).on( 'touchend keydown', function( ev ) {
- // if touch or key not Tab or Shift
- if ( ev.type === 'touchend' || ( ev.which !== 9 && ev.which !==
16 ) ) {
- searchOverlay.showAndFocus();
- }
+ $( '#searchInput' ).on( 'touchend mouseup', function() {
+ searchOverlay.showAndFocus();
} );
}
init();
--
To view, visit https://gerrit.wikimedia.org/r/72631
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab1de24c21d1f937a793830ec23d90ab5c30f9a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits