User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Ubuntu/10.04 Chromium/8.0.552.237 Chrome/8.0.552.237 Safari/534.10
Build Identifier: Mozilla XULRunner 220.127.116.11 - 20101206143738
The CSS property “-moz-user-focus” doesn't work in my text field.
Steps to Reproduce:
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window width="400" height="300"
<textbox id="textBox2" style="-moz-user-focus: none;"/>
the textBox2 is focusable
the textBox2 should not be focusable
As a workaround, provided by Neil:
"The textbox itself never takes focus. Instead, XBL creates an anonymous XHTML input element inside the textbox, and this is what takes focus. You can stop the textbox taking keyboard focus by setting its tab index to -1, and mouse focus by preventing the default action of mousedown events.
Another approach is to set the textbox to disabled or readonly, depending on why you don't want the textbox to be focused."
Still, I think the -moz-focus should work as well, and should prevent both keyboard and mouse focus.
I believe you should be using `ignore` instead of `none`:
Still, it looks like it is broken for touch events.
*** This bug has been marked as a duplicate of bug 894383 ***