pressing Esc when address bar is selected should return focus to window
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox133 | --- | fixed |
People
(Reporter: projectsymphony, Assigned: richardscollin)
References
Details
(Keywords: parity-chrome, parity-edge, Whiteboard: [sng])
Attachments
(1 file, 1 obsolete file)
Reporter | ||
Updated•10 years ago
|
Updated•10 years ago
|
Comment 2•10 years ago
|
||
Comment 5•6 years ago
|
||
To [::dao] or anyone: I'd like to give this a stab.
Before I try to get my hands in the code, is there any good reason (UX? Backwards compatibility? Addons?) for not implementing this?
(And that would mean an eventual patch of mine would be refused 😕)
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Still a problem in 111.0.1
I have my capslock key mapped to escape (just like many other vim users), so any other alternative key combination by comparison is just plain un-ergonomic.
I'm very much hoping that this very standard UX behavior will be implemented soon.
Comment 7•2 years ago
|
||
I recently switch from Chrome to Firefox and this is driving me crazy. Every other input box loses focus when pressing escape. It makes sense to do the same or at least give an option for this behavior in the address bar.
Comment 8•2 years ago
|
||
When in the address bar and not a user typed value
Esc will focus the window
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•1 year ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee | ||
Comment 10•6 months ago
|
||
Hi, I'm also wanting this feature. I actually implemented a fix for myself before logging in on bugzilla and realizing that a fix has already been implemented, but there are some outstanding revisions requested. I am not very familiar with the process of contributing, but if I address the comments in phabricator with a changeset is there hope for getting this functionality reviewed and added? Maybe the original contributor is still interested in completing the work, if not then I'm willing to take it over.
Comment 11•6 months ago
|
||
Yes, we'd accept patches, and addressing comments is a good start.
There's some contributor documentation at https://firefox-source-docs.mozilla.org/setup/contributing_code.html
Comment 12•5 months ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:dao, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Comment 13•3 months ago
|
||
Hey Collin, looks like flippidippi is inactive, so this is good to pick up.
Assignee | ||
Comment 14•3 months ago
|
||
Updated•3 months ago
|
Assignee | ||
Comment 15•3 months ago
|
||
I addressed most of the issues in a new changeset. Please let me know if there are any other desired changes.
Updated•3 months ago
|
Comment 16•3 months ago
|
||
Comment 17•3 months ago
|
||
Backed out for causing multiple browser failures related to urlbar.
Updated•3 months ago
|
Updated•3 months ago
|
Assignee | ||
Comment 18•3 months ago
|
||
The failing accessible/tests/browser/events/browser_test_selection_urlbar.js
test relies on being able to press escape twice after window open to more reliably select the url text. Now pressing escape multiple times will result in the url text deselected and then the url bar unfocused. I could only reliably get this test to succeed by removing both of the calls to escape.
The failing tests in browser/components/urlbar/tests/browser/browser_UrlbarInput_searchTerms_revert.js
are related to restoring logic with browser.urlbar.showSearchTerms.featureGate
enabled. Changing the call from this.input.handleRevert(true)
to this.input.handleRevert(false)
in UrlbarController.sys.mjs:334
seemed to have the desired behavior when testing the url reset behavior manually, but don't cause the tests to pass.
I'll spend some more time this week investigating and trying to get these tests to pass.
Updated•3 months ago
|
Updated•3 months ago
|
Comment 19•3 months ago
|
||
Hey Collin, have you had the chance to take another look at getting those tests to pass? No pressure, just checking to make sure this bug doesn't get lost. Let us know if we can help. Thanks!
Assignee | ||
Comment 20•3 months ago
|
||
No, I haven't had a chance to investigate much further then I did previously. Once I have a bit of free time I'll post another changeset.
For the failing accessibility test I'm tempted to remove the two calls to synthesize the escape key in accessible/tests/browser/events/browser_test_selection_urlbar.js
, but the comments make me think they might have originally there to avoid flaky tests. Any thoughts on that?
Updated•3 months ago
|
Comment 21•1 month ago
|
||
(In reply to Collin Richards from comment #20)
No, I haven't had a chance to investigate much further then I did previously. Once I have a bit of free time I'll post another changeset.
For the failing accessibility test I'm tempted to remove the two calls to synthesize the escape key in
accessible/tests/browser/events/browser_test_selection_urlbar.js
, but the comments make me think they might have originally there to avoid flaky tests. Any thoughts on that?
I think that's fine. The test is a few years old and there's a chance that what was flaky isn't anymore. It passes for me locally with that change.
Regarding browser_UrlbarInput_searchTerms_revert.js
, it looks like we might be hitting Esc too often in the local synthesizeRevert
function. Removing { repeat: 2 }
seems to make the test pass, but I haven't fully read through the test to see that it still tests what it's supposed to test.
Does this help?
Comment 22•1 month ago
|
||
(In reply to Dão Gottwald [:dao] from comment #21)
(In reply to Collin Richards from comment #20)
No, I haven't had a chance to investigate much further then I did previously. Once I have a bit of free time I'll post another changeset.
For the failing accessibility test I'm tempted to remove the two calls to synthesize the escape key in
accessible/tests/browser/events/browser_test_selection_urlbar.js
, but the comments make me think they might have originally there to avoid flaky tests. Any thoughts on that?I think that's fine. The test is a few years old and there's a chance that what was flaky isn't anymore. It passes for me locally with that change.
Regarding
browser_UrlbarInput_searchTerms_revert.js
, it looks like we might be hitting Esc too often in the localsynthesizeRevert
function. Removing{ repeat: 2 }
seems to make the test pass, but I haven't fully read through the test to see that it still tests what it's supposed to test.
I updated the patch with these two test fixes, however there's still an issue with browser_ime_composition.js
that I'm not sure how to resolve: https://treeherder.mozilla.org/jobs?repo=try&revision=cb55c3367a2b3ad48af354c95da299d4454dec12&selectedTaskRun=RN1RgNOFR_CXrfaaX1YaKw.0
Marco, do you have ideas here?
Updated•1 month ago
|
Comment 23•1 month ago
|
||
(In reply to Dão Gottwald [:dao] from comment #22)
I updated the patch with these two test fixes, however there's still an issue with
browser_ime_composition.js
that I'm not sure how to resolve: https://treeherder.mozilla.org/jobs?repo=try&revision=cb55c3367a2b3ad48af354c95da299d4454dec12&selectedTaskRun=RN1RgNOFR_CXrfaaX1YaKw.0
Marco, do you have ideas here?
Off-hand I would guess some of the ESC press before composeAndCheckPanel are excessive, the panel is already closed (we close the panel on compositionstart) and we press ESC thinking it's open, and then with this patch the urlbar loses focus and composition fails.
Maybe promisePopupClose should check the panel is effectively open before executing the closeFn?
Comment 24•1 month ago
|
||
(In reply to Marco Bonardo [:mak] from comment #23)
Off-hand I would guess some of the ESC press before composeAndCheckPanel are excessive, the panel is already closed (we close the panel on compositionstart) and we press ESC thinking it's open, and then with this patch the urlbar loses focus and composition fails.
That's helpful, thanks. Wasn't sure about the implied panel states around composition.
Maybe promisePopupClose should check the panel is effectively open before executing the closeFn?
Yeah, I think it should probably report a failure in that case. However, to get this landed, I'll first try to fix browser_ime_composition.js
specifically and see if that's sufficient, and if so we can revisit promisePopupClose
in a separate bug.
Comment 25•1 month ago
|
||
Comment 26•1 month ago
|
||
Backed out for causing
- Backout link
- Push with failures
- Failure Log
- Failure line:
[task 2024-10-16T12:56:34.416Z] 12:56:34 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_persist_searchMode.js | Urlbar should never be in search mode without the corresponding attribute. - true == true -
[task 2024-10-16T12:56:34.417Z] 12:56:34 INFO - Buffered messages finished
[task 2024-10-16T12:56:34.417Z] 12:56:34 INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_persist_searchMode.js | gURLBar.searchMode should exist as expected - true == false -
[task 2024-10-16T12:56:34.417Z] 12:56:34 INFO - Stack trace:
[task 2024-10-16T12:56:34.417Z] 12:56:34 INFO - resource://testing-common/UrlbarTestUtils.sys.mjs:assertSearchMode:827
[task 2024-10-16T12:56:34.418Z] 12:56:34 INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_persist_searchMode.js:test_escape_searchmode:113
[task 2024-10-16T12:56:34.418Z] 12:56:34 INFO - chrome://mochikit/content/browser-test.js:handleTask:1145
[task 2024-10-16T12:56:34.418Z] 12:56:34 INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1217
[task 2024-10-16T12:56:34.418Z] 12:56:34 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1358
[task 2024-10-16T12:56:34.418Z] 12:56:34 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1134
[task 2024-10-16T12:56:34.418Z] 12:56:34 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
Please check the other failures in the log.
Comment 27•1 month ago
|
||
Comment 28•1 month ago
|
||
Backed out changeset c3560df7c73f (Bug 1086524) for causing bc failures on browser_searchModeSwitcher_basic.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=478557188&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/fc5e94141008bf78b701d8458e0af55165b7b0d5
Comment 29•1 month ago
|
||
Updated•1 month ago
|
Comment 30•1 month ago
|
||
bugherder |
Description
•