Open
Bug 984089
Opened 11 years ago
Updated 3 years ago
Remove the overridden TAB keymap in editor.js
Categories
(DevTools :: Source Editor, defect)
DevTools
Source Editor
Tracking
(Not tracked)
NEW
People
(Reporter: Optimizer, Unassigned)
Details
As far as I can see CodeMirror by default has exactly the same behavior as what is being tried to achieve in editor.js's constructor of Editor class. We should not override it as it makes it impossible for Firefox Add-ons to override the Tab key via the extraKeys route.
Comment 1•11 years ago
|
||
If you go to http://codemirror.net/ and pres [tab] in the text editor, a hard-tab will be inserted instead of two spaces. Hence why we do it in the editor.js
| Reporter | ||
Comment 2•11 years ago
|
||
So the right way is to add an extra key, instead of overriding the tab key completely. And then using the insertSoftTab command of CM rather than replacing tabs with space and stuff.
I will attach a patch.
Comment 3•11 years ago
|
||
That code was taken from the manual: http://codemirror.net/doc/manual.html#keymaps
Comment 4•11 years ago
|
||
What we should do, instead, is check whether extraKeys has something to override the [tab] and then **append** to our current logic.
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•