Closed Bug 1505024 Opened 2 years ago Closed 2 years ago

Hitting Cmd+F when filter input is already focused shows an unwanted search UI in JsTerm

Categories

(DevTools :: Console, defect, P1)

65 Branch
defect

Tracking

(firefox64 verified, firefox65 verified)

VERIFIED FIXED
Firefox 65
Tracking Status
firefox64 --- verified
firefox65 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(2 files)

Attached image image.png
**Steps to reproduce**
1. Open the console
2. Hit Cmd+F (or Ctrl+F if not on OSX)
3. The filter input should be focused
4. Hit Cmd+F (or Ctrl+F if not on OSX) again


**Expected results**

The focus stays on the input

**Actual results**

The filter input is blurred, and a weird search UI is displayed in the JsTerm

---

What gets triggered is the codeMirror "built-in" search UI.
It is enabled via the "search" addon.
This patches fixes a bug where hitting Cmd+F while
the filter input of the console was focused was
triggering codeMirror search addon, displaying the
search UI *in* JsTerm.
To prevent this, we add the ability for any consumer
of the Editor component to disable the search addon.
In the editor, in such case, we simply don't initialize
the event listeners that activate the search addon.
A test case is added to ensure we don't regress this.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e9a8115d4c8f
Disable codeMirror search addon in JsTerm; r=Honza.
https://hg.mozilla.org/mozilla-central/rev/e9a8115d4c8f
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Comment on attachment 9022928 [details]
Bug 1505024 - Disable codeMirror search addon in JsTerm; r?Honza.

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: None

User impact if declined: Cmd/Ctrl+F while in the filter input displays an awkward piece of UI in the console input, which is really confusing

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: Yes

If yes, steps to reproduce: 1. Open the console
2. You should be focused in the console input
3. Hit Ctrl+F (or Cmd+F on OSX)
4. The filter input should be focused
5. Hit Ctrl+F (or Cmd+F on OSX) again
6. The filter input should still be focused.

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): This is a relatively small and constrained change, with automated test.

String changes made/needed:
Attachment #9022928 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Comment on attachment 9022928 [details]
Bug 1505024 - Disable codeMirror search addon in JsTerm; r?Honza.

simple devtools bug fix, approved for 64.0b8
Attachment #9022928 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on Firefox Nightly 65.0a1 / 20181108100100 on Windows 10, Ubuntu 16.04 and MacOS 10.13.6.
The issue is still visible on DevEdition 64.0b7 on the above OS-es. I will reverify it once 64.0b8 is available.
Verified as fixed on DevEdition 64.0b8 / 20181108141956 on Windows 10, Ubuntu 16.04 and MacOS 10.13.6.
Flags: qe-verify+
Updating bug status as well, based on the previous 3 comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.