зеркало из https://github.com/mozilla/gecko-dev.git
fix bug 58408 Trailing whitespace not stripped from filename being printed to
fix by bzbarsky@mit.edu r=mao,timeless sr=alecf
This commit is contained in:
Родитель
23b3ae99cf
Коммит
01d30ca677
|
@ -99,6 +99,14 @@ function checkValid(elementID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------
|
||||||
|
function stripTrailingWhitespace(element)
|
||||||
|
{
|
||||||
|
var stringIn = element.value;
|
||||||
|
stringIn = stringIn.replace(/\s+$/,"");
|
||||||
|
element.value = stringIn;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
function doPrintToFile( value )
|
function doPrintToFile( value )
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ Contributor(s): Masaki Katakai <katakai@japan.sun.com>
|
||||||
<row valign="baseline">
|
<row valign="baseline">
|
||||||
<text id="fileLabel" class="label" value="&fileInput.label;"/>
|
<text id="fileLabel" class="label" value="&fileInput.label;"/>
|
||||||
<box>
|
<box>
|
||||||
<textfield id="fileInput" flex ="1"/>
|
<textfield id="fileInput" flex ="1" onblur="stripTrailingWhitespace(this)"/>
|
||||||
<button id="chooseFile" value = "&chooseButton.label;" oncommand = "onChooseFile()"/>
|
<button id="chooseFile" value = "&chooseButton.label;" oncommand = "onChooseFile()"/>
|
||||||
</box>
|
</box>
|
||||||
</row>
|
</row>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче