<?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>141529</bug_id>
          
          <creation_ts>2015-02-12 12:59:57 -0800</creation_ts>
          <short_desc>input type=&quot;color&quot; duplicated colour well</short_desc>
          <delta_ts>2022-09-24 16:16:52 -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>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.10</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tom Grimwood-Taylor">tom</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>dan</cc>
    
    <cc>dvpdiner2</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1068716</commentid>
    <comment_count>0</comment_count>
      <attachid>246470</attachid>
    <who name="Tom Grimwood-Taylor">tom</who>
    <bug_when>2015-02-12 12:59:57 -0800</bug_when>
    <thetext>Created attachment 246470
A very simple HTML document used in the above description

The colour well displayed by &lt;input type=&quot;color&quot; /&gt; is duplicated when the popover is displayed and the page scrolled. The duplicated well remains even after closing the popover.

To see the issue open the attached HTML document.
Click the color well to show the popover.
Scroll the page.
Note that there are now two wells, one in the original position and one attached to the popover.
Close the popover by clicking elsewhere on the page.
Scroll the page and note that there are still two wells.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068717</commentid>
    <comment_count>1</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2015-02-12 13:03:31 -0800</bug_when>
    <thetext>Here&apos;s a speculative fix.  Try it and see if it fixes it.

Index: WebKit2/UIProcess/WebPageProxy.cpp
===================================================================
--- WebKit2/UIProcess/WebPageProxy.cpp	(revision 179993)
+++ WebKit2/UIProcess/WebPageProxy.cpp	(working copy)
@@ -3622,7 +3622,10 @@
 #if ENABLE(INPUT_TYPE_COLOR_POPOVER)
     // A new popover color well needs to be created (and the previous one destroyed) for
     // each activation of a color element.
-    m_colorPicker = 0;
+    if (m_colorPicker) {
+        m_colorPicker-&gt;invalidate();
+        m_colorPicker = nullptr;
+    }
 #endif
     if (!m_colorPicker)
         m_colorPicker = m_pageClient.createColorPicker(this, initialColor, elementRect);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1069316</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Grimwood-Taylor">tom</who>
    <bug_when>2015-02-15 09:46:07 -0800</bug_when>
    <thetext>The speculative fix attached by Alex Christensen doesn&apos;t fix the issue.

It may be more clear what the issue is in the second attachment.

Firstly, if you click the input element in the centre of the page and scroll down you&apos;ll see that there are two colour wells. One of them, the original, will scroll with the page as expected. The other, which has the popover attached, will remain fixed where the original well was before scrolling. So it appears that rather than attaching a popover to the existing colour well, a new one is created at a fixed position. I&apos;d expect the popover to be attached to the existing one and scroll with it as the popovers attached to an event in Calendar.app do.

Secondly, when the page is clicked elsewhere the popover disappears as expected, but the duplicate colour well remains. If the original colour well is clicked, then the duplicate colour well will be removed and a new one added, again fixed in the new position of the original colour well.

I&apos;ll try to figure out how to write a test case for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1069317</commentid>
    <comment_count>3</comment_count>
      <attachid>246621</attachid>
    <who name="Tom Grimwood-Taylor">tom</who>
    <bug_when>2015-02-15 09:46:45 -0800</bug_when>
    <thetext>Created attachment 246621
Example used by my second comment</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1774911</commentid>
    <comment_count>4</comment_count>
    <who name="Dan">dan</who>
    <bug_when>2021-07-06 03:05:13 -0700</bug_when>
    <thetext>Can&apos;t reproduce issue in Safari 14 nor Safari 15 TP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900939</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-24 16:16:52 -0700</bug_when>
    <thetext>I am not able to reproduce this bug in Safari 16 using attached test cases and as soon as I scroll, it invalidates and remove &quot;color&quot; input from the input and does not show any lingering or overhanging input popover. It is matching with other browsers except Firefox Nightly 107, which has color field as window rather than popover.

Since it is not happening and also confirmed in Comment 04, I am marking this as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>246470</attachid>
            <date>2015-02-12 12:59:57 -0800</date>
            <delta_ts>2015-02-12 12:59:57 -0800</delta_ts>
            <desc>A very simple HTML document used in the above description</desc>
            <filename>input_type_color_bug.html</filename>
            <type>text/html</type>
            <size>109</size>
            <attacher name="Tom Grimwood-Taylor">tom</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICA8L2hlYWQ+CiAgICA8Ym9keT4K
ICAgICAgICA8aW5wdXQgdHlwZT0iY29sb3IiIC8+CiAgICA8L2JvZHk+CjwvaHRtbD4KCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>246621</attachid>
            <date>2015-02-15 09:46:45 -0800</date>
            <delta_ts>2015-02-15 09:46:45 -0800</delta_ts>
            <desc>Example used by my second comment</desc>
            <filename>input_type_color_popover_bug.html</filename>
            <type>text/html</type>
            <size>303</size>
            <attacher name="Tom Grimwood-Taylor">tom</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHN0eWxlPgogICAgICAg
ICAgICBib2R5IHsKICAgICAgICAgICAgICAgIGhlaWdodDogMTAwMHB4OwogICAgICAgICAgICB9
CgogICAgICAgICAgICBpbnB1dCB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7
CiAgICAgICAgICAgICAgICB0b3A6IDUwJQogICAgICAgICAgICB9CiAgICAgICAgPC9zdHlsZT4K
ICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICAgIDxpbnB1dCB0eXBlPSJjb2xvciIgLz4KICAg
IDwvYm9keT4KPC9odG1sPgoK
</data>

          </attachment>
      

    </bug>

</bugzilla>