r111098 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111097‎ | r111098 | r111099 >
Date:21:20, 9 February 2012
Author:brion
Status:deferred
Tags:
Comment:
tweak click handling for android
Modified paths:
  • /trunk/mockups/glaucus-quick/app.js (modified) (history)

Diff [purge]

Index: trunk/mockups/glaucus-quick/app.js
@@ -53,8 +53,13 @@
5454 }
5555 }
5656
 57+ var alreadyClicked = true;
5758 $(document).bind('click', function() {
58 - showMenuThingy();
 59+ if (alreadyClicked) {
 60+ alreadyClicked = false;
 61+ } else {
 62+ showMenuThingy();
 63+ }
5964 });
6065 $(document).bind('scroll', function() {
6166 hideMenuBar();
@@ -68,7 +73,7 @@
6974 $(document).unbind('touchmove.menubar');
7075 $(document).unbind('touchend.menubar');
7176 showMenuThingy();
72 - e.preventDefault();
 77+ alreadyClicked = true;
7378 });
7479 $(document).bind('touchmove.menubar', function() {
7580 // moved too much! cancel
@@ -78,6 +83,7 @@
7984 } else {
8085 // for start of scrolling or touch to clear
8186 hideMenuBar();
 87+ alreadyClicked = true;
8288 }
8389 });
8490