<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Pressing delete in the styles sidebar with no text causes text to become misaligned"
   href="https://bugs.webkit.org/show_bug.cgi?id=146715#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Pressing delete in the styles sidebar with no text causes text to become misaligned"
   href="https://bugs.webkit.org/show_bug.cgi?id=146715">bug 146715</a>
              from <span class="vcard"><a class="email" href="mailto:drousso&#64;apple.com" title="drousso&#64;apple.com">drousso&#64;apple.com</a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=256363&amp;action=diff" name="attach_256363" title="Patch">attachment 256363</a> <a href="attachment.cgi?id=256363&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=256363&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=256363&amp;action=review</a>

<span class="quote">&gt;&gt; Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:482
&gt;&gt; +        if (change.origin !== &quot;+delete&quot; || (!change.to.line &amp;&amp; !change.to.ch) || this._completionController.isShowingCompletions())
&gt; 
&gt; Does this happen if there is text or only empty? !change.to.line &amp;&amp; !change.to.ch will still be true if there is text.</span >

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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>