Closed Bug 1481443 Opened 2 years ago Closed 2 years ago

Alt-b and Alt-f move back or forward one word and add a unicode character at the same time in DevTools console

Categories

(DevTools :: Shared Components, defect, P2)

63 Branch
x86_64
macOS
defect

Tracking

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 unaffected, firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- fixed

People

(Reporter: unmanbearpig, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:63.0) Gecko/20100101 Firefox/63.0
Build ID: 20180807100107

Steps to reproduce:

Open DevTools console, type some words, press Alt-b and Alt-f, it moves the cursor and adds characters at the same time.

mozregression report:
 8:18.16 INFO: Last good revision: 6cdfa85af851cd124cd535dacd0ce8e4131aeec5
 8:18.16 INFO: First bad revision: d01677a667bc35ccd45af746d035d3daa97571ba
 8:18.16 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=6cdfa85af851cd124cd535dacd0ce8e4131aeec5&tochange=d01677a667bc35ccd45af746d035d3daa97571ba



Actual results:

it moved the cursor back or forward one word and added a unicode character "∫" for Alt-b or "ƒ" for Alt-f.


Expected results:

Either insert a unicode character or move back or forward one word, not both. In older versions of Firefox it added special characters without moving the cursor.
Keywords: regression
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Component: Untriaged → Console
Product: Firefox → DevTools
Assignee: nobody → nchevobbe
Blocks: 1458831
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Also happening in the StyleEditor, which makes me think it's more a source-editor issue.
Component: Console → Shared Components
Without this patch, hitting Alt-B was adding a character **and** moving
the cursor to the previous group, while Alt-F was also adding a character
**and** moving the cursor to the next group.
We disable the shortcut to fix this and add a test to make sure we don't
regress.
Attachment #8998439 - Flags: review?(gl)
I am wondering if there was a way we could just disable the cursor moving to the next group rather than also disabling adding the unicode when we do Alt-F/B.
the patch should still allow to print the unicode (locally it does, I think it's a limitation of EventUtils if it's not reflected in the test).
By the way the test fails on Linux (no character is inserted), so maybe I'll have different test case depending on the OS (definitely not great though).
Comment on attachment 8998439 [details]
Bug 1481443 - Disable Alt-B & Alt-F shortcut in source editor; r=gl.

Gabriel [:gl] (ΦωΦ) has approved the revision.
Attachment #8998439 - Flags: review+
Attachment #8998439 - Flags: review?(gl)
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20a3b24e500a
Disable Alt-B & Alt-F shortcut in source editor; r=gl.
https://hg.mozilla.org/mozilla-central/rev/20a3b24e500a
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.