RESOLVED FIXED 107944
Web Inspector: implmenet Ctrl-Arrow/Ctrl-Backspace in DefaultTextEditor
https://bugs.webkit.org/show_bug.cgi?id=107944
Summary Web Inspector: implmenet Ctrl-Arrow/Ctrl-Backspace in DefaultTextEditor
Andrey Lushnikov
Reported 2013-01-25 06:27:02 PST
Support Ctrl-Arrow/Ctrl-Shift-Arrow/Ctrl-Backspace shortcuts in DefaultTextEditor. Current implementation makes them unpredictable and thus unusable.
Attachments
Patch (25.18 KB, patch)
2013-01-25 06:38 PST, Andrey Lushnikov
no flags
Patch (24.82 KB, patch)
2013-01-25 07:50 PST, Andrey Lushnikov
no flags
Patch (24.64 KB, patch)
2013-01-25 07:52 PST, Andrey Lushnikov
no flags
Patch (26.81 KB, patch)
2013-01-29 06:00 PST, Andrey Lushnikov
no flags
Andrey Lushnikov
Comment 1 2013-01-25 06:38:13 PST
Pavel Feldman
Comment 2 2013-01-25 06:51:51 PST
Comment on attachment 184740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184740&action=review > Source/WebCore/ChangeLog:9 > + and delete words. Their behaviour should be equal to Sublime 2's. This should be fixed in content editable.
Pavel Feldman
Comment 3 2013-01-25 07:08:24 PST
Comment on attachment 184740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184740&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:416 > + this._shortcuts[WebInspector.KeyboardShortcut.makeKey(keys.Left.code, modifiers.CtrlOrMeta)] = this._handleCtrlArrow.bind(this, "left"); Do not affect meta. > Source/WebCore/inspector/front-end/DefaultTextEditor.js:434 > + return (char >= 'a' && char <= 'z') || what about unicode letters? > Source/WebCore/inspector/front-end/DefaultTextEditor.js:444 > + return char === " "; What about \t ?
Andrey Lushnikov
Comment 4 2013-01-25 07:50:19 PST
Andrey Lushnikov
Comment 5 2013-01-25 07:52:19 PST
Pavel Feldman
Comment 6 2013-01-28 01:05:35 PST
Comment on attachment 184754 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184754&action=review > Source/WebCore/inspector/front-end/DefaultTextEditor.js:417 > + this._shortcuts[WebInspector.KeyboardShortcut.makeKey(keys.Right.code, modifiers.Ctrl)] = this._handleCtrlArrow.bind(this, "right"); It would be great if we could extract these into a common 'controller' subclass (located in the same file). > Source/WebCore/inspector/front-end/DefaultTextEditor.js:434 > + var charCode = char.charCodeAt(0); lets use string comparizon > Source/WebCore/inspector/front-end/DefaultTextEditor.js:454 > + if (column === -1 && direction === "left") { growRangeLeft/Right
Andrey Lushnikov
Comment 7 2013-01-29 06:00:48 PST
Andrey Lushnikov
Comment 8 2013-01-29 06:01:54 PST
Comment on attachment 184754 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184754&action=review >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:417 >> + this._shortcuts[WebInspector.KeyboardShortcut.makeKey(keys.Right.code, modifiers.Ctrl)] = this._handleCtrlArrow.bind(this, "right"); > > It would be great if we could extract these into a common 'controller' subclass (located in the same file). fixed. >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:434 >> + var charCode = char.charCodeAt(0); > > lets use string comparizon fixed. >> Source/WebCore/inspector/front-end/DefaultTextEditor.js:454 >> + if (column === -1 && direction === "left") { > > growRangeLeft/Right these methods are not applicable here, because they do different thing.
WebKit Review Bot
Comment 9 2013-01-30 03:54:37 PST
Comment on attachment 185229 [details] Patch Clearing flags on attachment: 185229 Committed r141245: <http://trac.webkit.org/changeset/141245>
WebKit Review Bot
Comment 10 2013-01-30 03:54:43 PST
All reviewed patches have been landed. Closing bug.
Florin Malita
Comment 11 2013-01-30 09:26:20 PST
(In reply to comment #9) > (From update of attachment 185229 [details]) > Clearing flags on attachment: 185229 > > Committed r141245: <http://trac.webkit.org/changeset/141245> This seems to be causing consistent timeouts for text-editor-ctrl-movements.html: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector%2Feditor%2Ftext-editor-ctrl-movements.html Can you please take a look?
Florin Malita
Comment 12 2013-01-30 11:19:12 PST
Andrey Lushnikov
Comment 13 2013-01-31 01:19:16 PST
Thanks for letting me know! Created a bug to fix this: https://bugs.webkit.org/show_bug.cgi?id=108440
Note You need to log in before you can comment on or make changes to this bug.