[Webkit-unassigned] [Bug 70586] [Forms] Setting defaultValue should hide an input placeholder.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 23 22:42:06 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=70586


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #112150|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #5 from Darin Adler <darin at apple.com>  2011-10-23 22:42:06 PST ---
(From update of attachment 112150)
View in context: https://bugs.webkit.org/attachment.cgi?id=112150&action=review

Thanks for tackling this.

> Source/WebCore/html/HTMLInputElement.cpp:1303
> +    updatePlaceholderVisibility(false);

This is the wrong way to do it. You also want the placeholder to go away if the value attribute is set directly. For example, if your test said this:

    document.getElementById("c1").setAttribute("value", "Default");

We need to test both cases, and we need code that works in both cases.

The way to do that is to put the code into parseMappedAttribute, in the case for valueAttr. In fact, it should go inside the !hasDirtyValue if statement, since it only needs to run if the default value hasn’t been overwritten.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list