Closed
Bug 582269
Opened 16 years ago
Closed 16 years ago
onKeyUp for KEYCODE_BACK handled incorrectly when keydown was in another activity
Categories
(Core Graveyard :: Widget: Android, defect)
Tracking
(fennec2.0a1+)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| fennec | 2.0a1+ | --- |
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
Attachments
(1 file)
|
5.29 KB,
patch
|
mwu
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Open Fennec.
2. Long-press the Home key and switch directly to another app.
3. Press the Back key in the other app.
4. After Fennec reappears, release the Back key.
Expected results: Nothing happens.
Actual results: Fennec goes back (or closes/hides the tab if it can't go back).
nsWindow::mSpecialKeyTracking does not prevent this, because it gets set on any keydown event (not just the initial keydown). The Android browser works around this by using startTracking() only when getRepeatCount() returns 0: http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=blob;f=src/com/android/browser/BrowserActivity.java;h=5e557893b5b61976ea23860e0d52fc14f1644a82;hb=HEAD#l2073
| Assignee | ||
Comment 1•16 years ago
|
||
This patch fixes the bug. Also includes the search button fix from bug 575351, since this patch required most of that fix too.
Note: I've discovered that the steps to reproduce do not work with most apps, which wait until onKeyUp for the back button action. I first noticed the bug with the http://www.onebusaway.org/ app, which uses onKeyDown for the back button. So maybe this is really a bug in OneBusAway, that we don't need to fix in Fennec.
Attachment #460572 -
Flags: review?(mwu)
Comment 2•16 years ago
|
||
Comment on attachment 460572 [details] [diff] [review]
patch
Getting rid of mSpecialKeyTracking? mbrubeck++
Attachment #460572 -
Flags: review?(mwu) → review+
| Assignee | ||
Updated•16 years ago
|
tracking-fennec: --- → ?
Comment 3•16 years ago
|
||
fix is in hand and it looks block-worthy for alpha 1
tracking-fennec: ? → 2.0a1+
| Assignee | ||
Comment 4•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•