[Webkit-unassigned] [Bug 13802] New: Background colors can't be reset to the default color

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 21 15:55:35 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13802

           Summary: Background colors can't be reset to the default color
           Product: WebKit
           Version: 522+ (nightly)
          Platform: Macintosh
               URL: http://www.joomlapolis.com/component/option,com_comprofi
                    ler/task,registers/
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Minor
          Priority: P4
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: brunner at lightning.ch


In all browsers, except Safari and webkit, background colors can be saved and
restored.

it looks like if el.style.background.slice(0,3) isn't handled properly ?

To reproduce:

Go to URL specified, go to bottom without filling out anything, hit "Send
Registration": all mandatory fields becom red, all is fine there.

Now go to any mandatory field, fill in something, then hit again "Send
Registration", you will see that field remains red, while in all other browsers
it reverts to background color.

This is done with Javascript on the DOM in the following way:

var cbDefaultFieldBackground;
                        if (me[i].value == '') {
                                errorMSG +=  blablabla\n';
                                if (cbDefaultFieldBackground === undefined)
cbDefaultFieldBackground = ((me[i].style.getPropertyValue) ?
me[i].style.getPropertyValue("background") : me[i].style.background);
                                me[i].style.background = "red";
                                iserror=1;
                        } elseif (me[i].style.background.slice(0,3)=="red")
me[i].style.background = cbDefaultFieldBackground;

Looking forward to a fix, as well as a hint how to make this function work in
Safari ;-)

(I'm the author of that form generator ;-) )


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list