Open Bug 426633 Opened 16 years ago Updated 12 years ago

In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", while typing in a color

Categories

(SeaMonkey :: Composer, defect)

defect
Not set
minor

Tracking

(Not tracked)

People

(Reporter: sgautherie, Unassigned)

Details

(Keywords: helpwanted)

From bug 294987 comment 8
{{
neil@parkwaycc.co.uk   2006-03-22 07:46:28 PDT

I think this is a limitation of the colour picker, it doesn't validate the
colour that you type in, except as a consequence of trying to set it as the
style of the colour well, which results in the CSS error as shown. I don't
actually know any other way of validating a colour style.
}}


[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008040201 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

Steps:
1. Start Browser.
2. > Edit > [Legacy] Preferences... > Composer > New Page Settings > Use custom
colors
3. Click on one of the 5 color buttons, so the color picker dialog opens.
4. In the textbox, type "#0000ff" (1 character at a time).
4r. Get the following errors:

{{
Warning: Error in parsing value for property 'background-color'.  Declaration dropped.
Source File: chrome://editor/content/EdColorPicker.xul
Line: 0

Warning: Expected color but found '#0'.  Error in parsing value for property 'background-color'.  Declaration dropped.
Source File: chrome://editor/content/EdColorPicker.xul
Line: 0

...
}}

The triggering line is
<http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/editor/ui/dialogs/content/EdColorPicker.js&rev=1.28&mark=252#245>

But I don't know how to fix this.

I think we would need a function (call) to validate the color value,
and if/while it is not valid, we should (not set the color and) disable the Ok button.
Component: Preferences → Composer
QA Contact: prefs → composer
Still actual
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0 SeaMonkey/2.13a1
Build identifier: 20120712003002
You need to log in before you can comment on or make changes to this bug.