зеркало из https://github.com/mozilla/gecko-dev.git
Bug 294987 - "In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color|" ((Av1b) <EdColorPicker.js>) [p=sgautherie.bz@free.fr (Serge Gautherie) r+sr=Neil]
This commit is contained in:
Родитель
5419c76caa
Коммит
961ee94f8e
|
@ -167,16 +167,21 @@ function Startup()
|
|||
gColorObj.LastBackgroundColor = gDialog.LastPickedColor.getAttribute("LastBackgroundColor");
|
||||
LastPickedColor = gColorObj.LastBackgroundColor;
|
||||
}
|
||||
gDialog.LastPickedColor.setAttribute("style","background-color: "+LastPickedColor);
|
||||
|
||||
// Set method to detect clicking on OK button
|
||||
// so we don't get fooled by changing "default" behavior
|
||||
gDialog.Ok.setAttribute("onclick", "SetDefaultToOk()");
|
||||
|
||||
// Make the "Last-picked" the default button
|
||||
// until the user selects a color
|
||||
gDialog.Ok.removeAttribute("default");
|
||||
gDialog.LastPickedButton.setAttribute("default","true");
|
||||
if (!LastPickedColor) {
|
||||
// Hide the button, as there is no last color available.
|
||||
gDialog.LastPickedButton.hidden = true;
|
||||
} else {
|
||||
gDialog.LastPickedColor.setAttribute("style", "background-color: " + LastPickedColor);
|
||||
|
||||
// Make "Last-picked" the default button, until the user selects a color.
|
||||
gDialog.Ok.removeAttribute("default");
|
||||
gDialog.LastPickedButton.setAttribute("default", "true");
|
||||
}
|
||||
|
||||
// Caller can prevent user from submitting an empty, i.e., default color
|
||||
NoDefault = gColorObj.NoDefault;
|
||||
|
|
Загрузка…
Ссылка в новой задаче