Skip to content
Permalink
Browse files

[] (0) Try once more to handle elements losing focus when they are hi…

…dden, and other focusing fixes.

git-svn-id: http://svn.whatwg.org/webapps@2805 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Feb 13, 2009
1 parent 457f1d5 commit 6fd6e2be460911a057bc0d4adbf002b5c67ce400
Showing with 24 additions and 20 deletions.
  1. +12 −10 index
  2. +12 −10 source
22 index

</ol>

<p>When the user moves the focus away from a <a href=#focusable>focusable</a>
element, the user agent should run the <a href=#unfocusing-steps>unfocusing steps</a>
that element.</p>

<p>When an element that is focused stops being a
<a href=#focusable>focusable</a> element, the user agent should run the
<a href=#unfocusing-steps>unfocusing steps</a> that element.</p>
<a href=#focusable>focusable</a> element, or stops being focused without
another element being explicitly focused in its stead, the user
agent should run the <a href=#focusing-steps>focusing steps</a> for <a href=#the-body-element-0>the body
element</a>, if there is one; if there is not, then the user
agent should run the <a href=#unfocusing-steps>unfocusing steps</a> for the affected
element only.</p>

<p class=example>For example, this might happen because the
element is removed from its <code>Document</code>, or has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute added. It would also
interested in the contents of the <a href=#browsing-context>browsing context</a> of
the <code><a href=#window>Window</a></code> object on which the method was invoked.</p>

<p>User agents are encouraged to have this <code title=dom-window-blur><a href=#dom-window-blur>focus()</a></code> method trigger some kind of
<p>User agents are encouraged to have this <code title=dom-window-focus><a href=#dom-window-focus>focus()</a></code> method trigger some kind of
notification.</p>

<p>The <dfn id=dom-window-blur title=dom-window-blur><code>blur()</code></dfn> method
</ol>

<p>The <dfn id=dom-blur title=dom-blur><code>blur()</code></dfn> method, when
invoked, should run the <a href=#unfocusing-steps>unfocusing steps</a> for the
element. User agents may selectively or uniformly ignore calls to
this method for usability reasons.</p>
invoked, should run the <a href=#focusing-steps>focusing steps</a> for <a href=#the-body-element-0>the
body element</a>, if there is one; if there is not, then it
should run the <a href=#unfocusing-steps>unfocusing steps</a> for the element on
which the method was called instead. User agents may selectively or
uniformly ignore calls to this method for usability reasons.</p>



22 source

</ol>

<p>When the user moves the focus away from a <span>focusable</span>
element, the user agent should run the <span>unfocusing steps</span>
that element.</p>

<p>When an element that is focused stops being a
<span>focusable</span> element, the user agent should run the
<span>unfocusing steps</span> that element.</p>
<span>focusable</span> element, or stops being focused without
another element being explicitly focused in its stead, the user
agent should run the <span>focusing steps</span> for <span>the body
element</span>, if there is one; if there is not, then the user
agent should run the <span>unfocusing steps</span> for the affected
element only.</p>

<p class="example">For example, this might happen because the
element is removed from its <code>Document</code>, or has a <code
the <code>Window</code> object on which the method was invoked.</p>

<p>User agents are encouraged to have this <code
title="dom-window-blur">focus()</code> method trigger some kind of
title="dom-window-focus">focus()</code> method trigger some kind of
notification.</p>

<p>The <dfn title="dom-window-blur"><code>blur()</code></dfn> method
</ol>

<p>The <dfn title="dom-blur"><code>blur()</code></dfn> method, when
invoked, should run the <span>unfocusing steps</span> for the
element. User agents may selectively or uniformly ignore calls to
this method for usability reasons.</p>
invoked, should run the <span>focusing steps</span> for <span>the
body element</span>, if there is one; if there is not, then it
should run the <span>unfocusing steps</span> for the element on
which the method was called instead. User agents may selectively or
uniformly ignore calls to this method for usability reasons.</p>



0 comments on commit 6fd6e2b

Please sign in to comment.
You can’t perform that action at this time.