RESOLVED FIXED 146715
Web Inspector: Pressing delete in the styles sidebar with no text causes text to become misaligned
https://bugs.webkit.org/show_bug.cgi?id=146715
Summary Web Inspector: Pressing delete in the styles sidebar with no text causes text...
Devin Rousso
Reported 2015-07-07 23:59:25 PDT
Created attachment 256362 [details] Current Functionality Instead of removing the first indent, pressing delete in an empty rule should not do anything.
Attachments
Current Functionality (154.56 KB, video/quicktime)
2015-07-07 23:59 PDT, Devin Rousso
no flags
Patch (1.73 KB, patch)
2015-07-08 00:01 PDT, Devin Rousso
no flags
Radar WebKit Bug Importer
Comment 1 2015-07-07 23:59:47 PDT
Devin Rousso
Comment 2 2015-07-08 00:01:39 PDT
Timothy Hatcher
Comment 3 2015-07-08 08:24:23 PDT
Comment on attachment 256363 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256363&action=review > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:482 > + if (change.origin !== "+delete" || (!change.to.line && !change.to.ch) || this._completionController.isShowingCompletions()) Does this happen if there is text or only empty? !change.to.line && !change.to.ch will still be true if there is text.
Devin Rousso
Comment 4 2015-07-08 10:32:41 PDT
Comment on attachment 256363 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256363&action=review >> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:482 >> + if (change.origin !== "+delete" || (!change.to.line && !change.to.ch) || this._completionController.isShowingCompletions()) > > Does this happen if there is text or only empty? !change.to.line && !change.to.ch will still be true if there is text. This is only supposed to happen if the cursor is on the first character of the first line, regardless of whether that line has text. Since pressing delete removes all markers at the cursor's position, if the cursor is at the beginning of a line it will remove the checkbox marker as well as the newline at the beginning of that line. On the first line, there is no previous line, so pressing delete would just remove the checkbox marker. We don't want this to happen.
WebKit Commit Bot
Comment 5 2015-07-08 11:37:23 PDT
Comment on attachment 256363 [details] Patch Clearing flags on attachment: 256363 Committed r186517: <http://trac.webkit.org/changeset/186517>
WebKit Commit Bot
Comment 6 2015-07-08 11:37:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.