Last modified: 2014-07-29 21:29:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69140, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67140 - tapping on the search input in mobile frontend takes you to previous page
tapping on the search input in mobile frontend takes you to previous page
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-26 16:29 UTC by matanya
Modified: 2014-07-29 21:29 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description matanya 2014-06-26 16:29:17 UTC
How to reproduce:

go to he.m.wikipedia.org and try to search with Hebrew letters.

Expected: letters show in the search box.


Actual: user taken to previous page.
Comment 1 Bingle 2014-06-26 16:30:22 UTC
Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/gfTmzanP
Comment 2 Ryan Kaldari 2014-06-26 17:06:23 UTC
Works fine for me. Can you provide additional details such as what browser you are using and what page you are searching from?
Comment 3 matanya 2014-06-26 17:11:19 UTC
firefox 30 on android 4.4.4, searched on main page, but happened on others too.
Comment 4 Ryan Kaldari 2014-06-26 17:28:28 UTC
Hmm, tried to reproduce in desktop Firefox 30, but no luck. I'll see if I can reproduce on Android when I'm at the office tomorrow.
Comment 5 Juliusz Gonera 2014-06-27 22:48:34 UTC
I tried on desktop Chrome and Firefox with Hebrew (lyx) keyboard on Linux, can't reproduce. I'll try to figure out how to install Hebrew keyboard on my Android phone...
Comment 6 Juliusz Gonera 2014-06-27 23:12:54 UTC
I reproduces it. Actually, only tapping on the search input (without typing) already takes me to the previous page. It sometimes happens on Chrome too. I can't reproduce on latest master on my local dev env. I suspect it might be this weird banner that is displayed on the top of the page that is causing this.
Comment 7 Florian 2014-06-28 15:41:03 UTC
Reproduced on en wikipedia, too. There is Wiki loves earth as Sitenotice (not seen, bc dismissed for my wiki account). If i click (in Chrome for Android, HTC One) the search bar, i will be redirected to the previous page.
Comment 8 Juliusz Gonera 2014-07-01 22:39:17 UTC
Yeah, saw it on enwiki the other day too...
Comment 9 Ryan Kaldari 2014-07-15 18:29:18 UTC
I have confirmed with certainty that this bug is dependent on CentralNotice banners being active.
Comment 10 Matt Walker 2014-07-15 18:33:06 UTC
Any banner? Or just the WikiLovesEarth banner?
Comment 11 Ryan Kaldari 2014-07-15 18:51:59 UTC
Seems to be any banner. Need to investigate further though.
Comment 12 Ryan Kaldari 2014-07-15 20:38:24 UTC
The bug does not happen for me after the banner is dismissed, however.
Comment 13 Ryan Kaldari 2014-07-15 20:43:21 UTC
So far reproduced in Chrome for Android and Mobile Safari. Haven't been able to reproduce on any desktop browser.
Comment 14 Ryan Kaldari 2014-07-15 21:11:22 UTC
Actually, it's any banner that is 40 pixels or taller.
Comment 15 Ryan Kaldari 2014-07-15 22:07:00 UTC
OK, I think I know what's going on. When you click on the search input, the search overlay renders at the top of the page. When there isn't a CentralNotice banner, it renders under the user's finger. When there is a CentralNotice banner (that's tall enough), it renders above the user's finger. The SearchOverlay.js code includes a bit of logic (lines 70-73) that executes window.history.back() whenever the user clicks outside of the overlay. This normally just closes the overlay due to the M.router functionality. In this case, the user clicking on the search input is getting read as a click outside the search overlay (assuming the user's finger remains on the screen for more than a split-second). Because either the URL hasn't been rewritten yet or the M.router code hasn't finished executing, it actually sends the user to the previous page when it executes window.history.back() (instead of just closing the overlay).
Comment 16 Ryan Kaldari 2014-07-15 22:53:32 UTC
I asked Moiz about moving the banner under the header, but he says it makes more sense to leave it at the top. Other possible solutions:
* Use a touchend event to trigger the launch of the search overlay.
* Make sure the window.history.back() doesn't execute until the URL has been rewritten and the M.router registration has finished executing.
* Make sure the search overlay is always positioned exactly above the search header (also would need to reposition on window resize).
There are probably some other options as well.
Comment 17 Gerrit Notification Bot 2014-07-16 02:21:24 UTC
Change 146684 had a related patch set uploaded by Kaldari:
Making sure that clicking on search doesn't trigger history.back()

https://gerrit.wikimedia.org/r/146684
Comment 18 Gerrit Notification Bot 2014-07-21 21:32:11 UTC
Change 146684 merged by jenkins-bot:
Making sure that clicking on search doesn't trigger history.back()

https://gerrit.wikimedia.org/r/146684
Comment 19 Gerrit Notification Bot 2014-07-29 20:01:00 UTC
Change 150368 had a related patch set uploaded by Kaldari:
Making sure that clicking on search doesn't trigger history.back()

https://gerrit.wikimedia.org/r/150368
Comment 20 Gerrit Notification Bot 2014-07-29 20:03:55 UTC
Change 150368 merged by jenkins-bot:
Making sure that clicking on search doesn't trigger history.back()

https://gerrit.wikimedia.org/r/150368
Comment 21 Andre Klapper 2014-07-29 21:29:40 UTC
Backport to 1.24wmf14 merged; closing again.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links