Bug 321707 Don't force this.select() in onfocus

patch by grapz@runbox.com r=timeless sr=neil
This commit is contained in:
timeless%mozdev.org 2006-05-11 13:34:15 +00:00
parent 2393b37747
commit 90466f8337
2 changed files with 10 additions and 13 deletions

View File

@ -85,7 +85,7 @@
<separator/>
<hbox align="center">
<label control="scalingInput" value="&scale.label;"/>
<textbox id="scalingInput" size="4" onfocus="this.select()" oninput="checkDouble(this)"/>
<textbox id="scalingInput" size="4" oninput="checkDouble(this)"/>
<label value="&scalePercent;"/>
<separator/>
<checkbox id="shrinkToFit" label="&shrinkToFit.label;"
@ -105,7 +105,7 @@
<hbox align="center">
<spacer flex="1"/>
<label control="topInput" value="&marginTop.label;"/>
<textbox id="topInput" size="5" oninput="changeMargin(this)" onfocus="this.select()"/>
<textbox id="topInput" size="5" oninput="changeMargin(this)"/>
<!-- This invisible label (with same content as the visible one!) is used
to ensure that the <textbox> is centered above the page. The same
technique is deployed for the bottom/left/right input fields, below. -->
@ -117,7 +117,7 @@
<vbox>
<spacer flex="1"/>
<label control="leftInput" value="&marginLeft.label;"/>
<textbox id="leftInput" size="5" oninput="changeMargin(this)" onfocus="this.select()"/>
<textbox id="leftInput" size="5" oninput="changeMargin(this)"/>
<label value="&marginLeft.label;" style="visibility: hidden;"/>
<spacer flex="1"/>
</vbox>
@ -137,7 +137,7 @@
<vbox>
<spacer flex="1"/>
<label control="rightInput" value="&marginRight.label;"/>
<textbox id="rightInput" size="5" oninput="changeMargin(this)" onfocus="this.select()"/>
<textbox id="rightInput" size="5" oninput="changeMargin(this)"/>
<label value="&marginRight.label;" style="visibility: hidden;"/>
<spacer flex="1"/>
</vbox>
@ -146,7 +146,7 @@
<hbox align="center">
<spacer flex="1"/>
<label control="bottomInput" value="&marginBottom.label;"/>
<textbox id="bottomInput" size="5" oninput="changeMargin(this)" onfocus="this.select()"/>
<textbox id="bottomInput" size="5" oninput="changeMargin(this)"/>
<label value="&marginBottom.label;" style="visibility: hidden;"/>
<spacer flex="1"/>
</hbox>

View File

@ -93,7 +93,7 @@
value="&scale.label;"
accesskey="&scale.accesskey;"/>
<textbox id="scalingInput" size="4"
onfocus="this.select();" oninput="checkDouble(this);"/>
oninput="checkDouble(this);"/>
<label value="&scalePercent;"/>
<separator/>
<checkbox id="shrinkToFit"
@ -121,7 +121,7 @@
value="&marginTop.label;"
accesskey="&marginTop.accesskey;"/>
<textbox id="topInput" size="5"
oninput="changeMargin(this);" onfocus="this.select();"/>
oninput="changeMargin(this);"/>
<!-- This invisible label (with same content as the visible one!)
is used to ensure that the <textbox> is centered above the
page. The same technique is deployed for the
@ -137,8 +137,7 @@
value="&marginLeft.label;"
accesskey="&marginLeft.accesskey;"/>
<textbox id="leftInput" size="5"
oninput="changeMargin(this);"
onfocus="this.select();"/>
oninput="changeMargin(this);"/>
<label style="visibility: hidden;" value="&marginLeft.label;"/>
<spacer flex="1"/>
</vbox>
@ -165,8 +164,7 @@
value="&marginRight.label;"
accesskey="&marginRight.accesskey;"/>
<textbox id="rightInput" size="5"
oninput="changeMargin(this);"
onfocus="this.select();"/>
oninput="changeMargin(this);"/>
<label style="visibility: hidden;" value="&marginRight.label;"/>
<spacer flex="1"/>
</vbox>
@ -178,8 +176,7 @@
value="&marginBottom.label;"
accesskey="&marginBottom.accesskey;"/>
<textbox id="bottomInput" size="5"
oninput="changeMargin(this);"
onfocus="this.select();"/>
oninput="changeMargin(this);"/>
<label style="visibility: hidden;" value="&marginBottom.label;" />
<spacer flex="1"/>
</hbox>