Bug 288194 - XUL <textbox> is too hard to focus. r=enndeakin

This commit is contained in:
Dão Gottwald 2008-09-28 20:58:48 +02:00
parent 0de987137c
commit 4d1b70d42d

View File

@ -271,6 +271,9 @@
if (!this.mIgnoreClick) {
this.mIgnoreFocus = true;
this.inputField.setSelectionRange(0, 0);
if (event.originalTarget == this ||
event.originalTarget == this.inputField.parentNode)
this.inputField.focus();
}
]]>
</handler>
@ -278,10 +281,8 @@
<handler event="click">
<![CDATA[
if (!this.mIgnoreClick && this.clickSelectsAll &&
this.inputField.selectionStart == this.inputField.selectionEnd) {
this.inputField.focus()
this.inputField.selectionStart == this.inputField.selectionEnd)
this.editor.selectAll();
}
]]>
</handler>
</handlers>