зеркало из 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 )
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ Contributor(s): Masaki Katakai <katakai@japan.sun.com>
|
|||
<row valign="baseline">
|
||||
<text id="fileLabel" class="label" value="&fileInput.label;"/>
|
||||
<box>
|
||||
<textfield id="fileInput" flex ="1"/>
|
||||
<textfield id="fileInput" flex ="1" onblur="stripTrailingWhitespace(this)"/>
|
||||
<button id="chooseFile" value = "&chooseButton.label;" oncommand = "onChooseFile()"/>
|
||||
</box>
|
||||
</row>
|
||||
|
|
Загрузка…
Ссылка в новой задаче