Closed
Bug 623624
Opened 14 years ago
Closed 13 years ago
Content elements don't get focus when the focus method is set on them
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: martijn.martijn, Assigned: vingtetun)
References
Details
(Keywords: testcase)
Attachments
(6 files, 4 obsolete files)
See upcoming testcase. In all cases, the element's background-color should be green on load or immediately after load. This doesn't happen with Fennec at the moment. This is more or less the opposite of the summary mentioned in bug 532738. Fwiw, I don't agree with the current summary of that bug ("Don't auto-focus input fields on page load").
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Reporter | ||
Comment 3•14 years ago
|
||
Attachment #501702 -
Attachment is obsolete: true
Reporter | ||
Comment 4•14 years ago
|
||
On first load, the elements don't get focus (FAIL), on reload they do get focus (PASS).
Reporter | ||
Comment 5•13 years ago
|
||
Also, closing the tab, then undo close tab, makes the tests fail.
Comment 6•13 years ago
|
||
Testcase #3 works for me on Android. I suspect we are not allowing the content process to become "active" soon enough after a load. Which is why the setTimeout testcase and the reloads work.
Reporter | ||
Comment 7•13 years ago
|
||
Attachment #501699 -
Attachment is obsolete: true
Reporter | ||
Comment 8•13 years ago
|
||
Attachment #501700 -
Attachment is obsolete: true
Reporter | ||
Comment 9•13 years ago
|
||
Attachment #501704 -
Attachment is obsolete: true
Reporter | ||
Comment 10•13 years ago
|
||
Reporter | ||
Comment 11•13 years ago
|
||
There is a hack in Fennec code that removes focus on page load, see bug 532738, comment 11. What I get with the stock Android browser on these testcases: testcase 1: input doesn't become green, but I get an 'input focus' event logged. When tapping on the input, the input becomes green and another 'input focus' event gets logged. testcase 2: link doesn't become green, but I get an 'input focus' event logged. Tapping on the link doesn't make it green, no 'input focus' event gets logged. Note that you get this result, if the first testcase wasn't carried out before. testcase 3: In short, same results as testcase 1. testcase 4: The same results as testcase 3. Note that this happens when the content page doesn't seem to have 'real' focus. If the content page does have focus, then you get the results as expected (except perhaps, that you can't focus links by tapping on them) It doesn't matter if the hardware keyboard is opened or closed. The software keyboard doesn't show up when the page script is calling focus. Ideally, Fennec should behave as expected, so untrusted focus events (from content script) shouldn't cause softkeyboard to appear.
Reporter | ||
Comment 12•13 years ago
|
||
Another case, where testcase 3 doesn't pass. - Open testcase 3 in a new tab. - Press reload on the newly opened tab with testcase 3. Actually, I think this is one of the reasons why I see a lot of mochitest failures related to focus. If a tab/window, for some reason, doesn't have focus, there is no way to get it back (not by using the .focus() method, at least)
Assignee | ||
Comment 13•13 years ago
|
||
The activeRemoteFrame call has been added during the days we moved from a non-e10s world to an e10s world (bug 573041) and has survived in TapDown until now. I don't see a good reason for not moving this call to selectedTab?
Attachment #514498 -
Flags: review?(mark.finkle)
Comment 14•13 years ago
|
||
Comment on attachment 514498 [details] [diff] [review] Patch for activating the remote frame on tab switching We need some test coverage on this ASAP.
Attachment #514498 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 15•13 years ago
|
||
http://hg.mozilla.org/mobile-browser/rev/e230a8add766
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 16•13 years ago
|
||
Backed out for a possible Ts regression: http://hg.mozilla.org/mobile-browser/rev/01d357abf087
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 17•13 years ago
|
||
Talos results from the backout indicate that this patch probably caused a 100ms (2%) regression in Ts.
Assignee | ||
Comment 18•13 years ago
|
||
I'm unsure about the fact the regression is caused by browser.focus(); but it could be possible (strange things happened during startup!) so this patch remove this line
Assignee: nobody → 21
Attachment #521763 -
Flags: review?(mark.finkle)
Comment 19•13 years ago
|
||
Comment on attachment 521763 [details] [diff] [review] Patch Make sure we watch for another regression
Attachment #521763 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 20•13 years ago
|
||
http://hg.mozilla.org/mobile-browser/rev/5d77401196ed
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 21•13 years ago
|
||
Ok, verified fixed on Fennec trunk on the Droid (and Windows desktop). This is fixed for the case mentioned in comment 12, not for the original issue that I filed. But that will be fixed by the fix for bug 532738 afaics, so I won't file a new bug for this, I'll just add a comment in there.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•