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


(DevTools :: Shared Components, defect, P2)

63 Branch


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

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


(Reporter: unmanbearpig, Assigned: nchevobbe)


(Blocks 1 open bug)


(Keywords: regression)


(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:

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
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
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
Disable Alt-B & Alt-F shortcut in source editor; r=gl.
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.