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 Dev
46 bytes, text/x-phabricator-request
|Details | Review|
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.
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Assignee: nobody → nchevobbe
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.
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+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/20a3b24e500a Disable Alt-B & Alt-F shortcut in source editor; r=gl.
You need to log in before you can comment on or make changes to this bug.