<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>147975</bug_id>
          
          <creation_ts>2015-08-13 06:07:54 -0700</creation_ts>
          <short_desc>REGRESSION: Web Inspector: Autocomplete sometimes requires two tab presses</short_desc>
          <delta_ts>2017-10-14 12:48:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=147720</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=147316</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=150493</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikita Vasilyev">nvasilyev</reporter>
          <assigned_to name="Devin Rousso">hi</assigned_to>
          <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1117215</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2015-08-13 06:07:54 -0700</bug_when>
    <thetext>Steps:
1. Type &quot;document.body.fir&quot; in the console
2. Press Tab

Expected:
&quot;fir&quot; is replaced with &quot;first&quot;, the least common prefix.

              firstElementChild
              firstChild
document.body.first|

Actual:
Nothing happens on first Tab press

              firstElementChild
              firstChild
document.body.fir|</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1117279</commentid>
    <comment_count>1</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2015-08-13 10:39:00 -0700</bug_when>
    <thetext>This is a regression from https://bugs.webkit.org/show_bug.cgi?id=147316.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1228249</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2016-09-09 11:20:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/28228742&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1228598</commentid>
    <comment_count>3</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2016-09-10 23:39:51 -0700</bug_when>
    <thetext>This is actually regular behavior.  The issue is that r187708 &lt;webkit.org/b/147316&gt; changed the logic for adding autocompletion hints from using CodeMirror.replaceRange to CodeMirror.setUniqueBookmark.  What this means is that when you hit tab on &quot;document.body.fir|&quot;, it will complete to &quot;document.body.first|&quot;, but since it uses CodeMirror.setUniqueBookmark (that we fully control styling over), the added text isn&apos;t committed (which means it doesn&apos;t get syntax highlighting and doesn&apos;t effect the current text in any way).  Using CodeMirror.replaceRange caused the text of the CodeMirror instance to change, which triggered a change to the stylesheet itself (which is also why r191419 &lt;webkit.org/b/147720&gt; was filed), which then updated CodeMirror and the syntax highlighting, causing you to see that the &quot;st&quot; after &quot;document.body.fir|&quot; changed colors (meaning it was autocompleted).  This should be fixed by &lt;webkit.org/b/150493&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1228599</commentid>
    <comment_count>4</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2016-09-10 23:41:49 -0700</bug_when>
    <thetext>(In reply to comment #3)
Oops...  Guess the link highlighting doesn&apos;t work without a scheme.

&gt; r187708 &lt;webkit.org/b/147316&gt;

https://webkit.org/b/147316


&gt; r191419 &lt;webkit.org/b/147720&gt;

https://webkit.org/b/147720


&gt; &lt;webkit.org/b/150493&gt;

https://webkit.org/b/150493</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1360459</commentid>
    <comment_count>5</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2017-10-14 12:48:39 -0700</bug_when>
    <thetext>Fixed in the new styles sidebar:
Bug 177313 - Web Inspector: Styles Redesign: hook up autocompletion to property names and values</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>