Skip to content

Commit

Permalink
[e] (0) Make placeholder='' and autofocus='' work better together
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26194
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8734 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 29, 2014
1 parent f3df212 commit 468ff6a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
9 changes: 7 additions & 2 deletions complete.html
Expand Up @@ -36788,8 +36788,13 @@ <h6 id=the-placeholder-attribute>4.10.5.3.10 The <code id=the-placeholder-attrib



<p>User agents should present this hint to the user, after having <a href=#strip-line-breaks id=the-placeholder-attribute:strip-line-breaks>stripped line breaks</a> from it, when the element's <a href=#concept-fe-value id=the-placeholder-attribute:concept-fe-value>value</a> is the empty string or the control is not <a href=#focused id=the-placeholder-attribute:focused>focused</a> (or both),
e.g. by displaying it inside a blank unfocused control and hiding it otherwise.</p>
<p>User agents should present this hint to the user, after having <a href=#strip-line-breaks id=the-placeholder-attribute:strip-line-breaks>stripped line breaks</a> from it, when the element's <a href=#concept-fe-value id=the-placeholder-attribute:concept-fe-value>value</a> is the empty string, especially if the control is not <a href=#focused id=the-placeholder-attribute:focused>focused</a>.</p>

<p>If a user agent normally doesn't show this hint to the user when the control is
<a href=#focused id=the-placeholder-attribute:focused-2>focused</a>, then the user agent should nonetheless show the hint for the control if it
was focused as a result of the <code id=the-placeholder-attribute:attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute, since
in that case the user will not have had an opportunity to examine the control before focusing
it.</p>



Expand Down
9 changes: 7 additions & 2 deletions index
Expand Up @@ -36788,8 +36788,13 @@ You cannot submit this form when the field is incorrect.</samp></pre>



<p>User agents should present this hint to the user, after having <a href=#strip-line-breaks id=the-placeholder-attribute:strip-line-breaks>stripped line breaks</a> from it, when the element's <a href=#concept-fe-value id=the-placeholder-attribute:concept-fe-value>value</a> is the empty string or the control is not <a href=#focused id=the-placeholder-attribute:focused>focused</a> (or both),
e.g. by displaying it inside a blank unfocused control and hiding it otherwise.</p>
<p>User agents should present this hint to the user, after having <a href=#strip-line-breaks id=the-placeholder-attribute:strip-line-breaks>stripped line breaks</a> from it, when the element's <a href=#concept-fe-value id=the-placeholder-attribute:concept-fe-value>value</a> is the empty string, especially if the control is not <a href=#focused id=the-placeholder-attribute:focused>focused</a>.</p>

<p>If a user agent normally doesn't show this hint to the user when the control is
<a href=#focused id=the-placeholder-attribute:focused-2>focused</a>, then the user agent should nonetheless show the hint for the control if it
was focused as a result of the <code id=the-placeholder-attribute:attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code> attribute, since
in that case the user will not have had an opportunity to examine the control before focusing
it.</p>



Expand Down
9 changes: 7 additions & 2 deletions source
Expand Up @@ -47178,8 +47178,13 @@ You cannot submit this form when the field is incorrect.</samp></pre>

<p>User agents should present this hint to the user, after having <span data-x="strip line
breaks">stripped line breaks</span> from it, when the element's <span
data-x="concept-fe-value">value</span> is the empty string or the control is not <span>focused</span> (or both),
e.g. by displaying it inside a blank unfocused control and hiding it otherwise.</p>
data-x="concept-fe-value">value</span> is the empty string, especially if the control is not <span>focused</span>.</p>

<p>If a user agent normally doesn't show this hint to the user when the control is
<span>focused</span>, then the user agent should nonetheless show the hint for the control if it
was focused as a result of the <code data-x="attr-fe-autofocus">autofocus</code> attribute, since
in that case the user will not have had an opportunity to examine the control before focusing
it.</p>

</div>

Expand Down

0 comments on commit 468ff6a

Please sign in to comment.