mozilla

Revision 48554 of -moz-user-focus

  • Revision slug: CSS/-moz-user-focus
  • Revision title: -moz-user-focus
  • Revision id: 48554
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment clean up; 29 words added, 73 words removed

Revision Content

Used to indicate whether the element can have the focus. By setting this to 'ignore', you can disable focusing the element, which means that the user will not be able to activate the element. The element will be skipped in the tab sequence. A similar property 'user-focus' has been proposed for CSS3.

ignore
The element does not accept the keyboard focus and will be skipped in the tab order.
normal
The element can accept the keyboard focus.
Note: This property doesn't work for XUL {{ XULElem("textbox") }} elements, because the textbox itself never takes focus. Instead, XBL creates an anonymous HTML {{ HTMLElement("input") }} element inside the textbox, and that element is what receives focus. You can stop the textbox from taking keyboard focus by setting its tab index to -1, and from taking mouse focus by preventing the default action of mousedown events.

Revision Source

<p>Used to indicate whether the element can have the focus. By setting this to 'ignore', you can disable focusing the element, which means that the user will not be able to activate the element. The element will be skipped in the tab sequence. A similar property 'user-focus' has been proposed for CSS3.</p>
<dl> <dt><code>ignore</code></dt> <dd>The element does not accept the keyboard focus and will be skipped in the tab order.</dd> <dt><code>normal</code></dt> <dd>The element can accept the keyboard focus.</dd>
</dl>
<div class="note"><strong>Note:</strong> This property doesn't work for XUL {{ XULElem("textbox") }} elements, because the <code>textbox</code> itself never takes focus. Instead, XBL creates an anonymous HTML {{ HTMLElement("input") }} element inside the <code>textbox</code>, and that element is what receives focus. You can stop the <code>textbox</code> from taking keyboard focus by setting its tab index to -1, and from taking mouse focus by preventing the default action of <code>mousedown</code> events.</div>
Revert to this revision