khtml regression

David Faure david at mandrakesoft.com
Mon Dec 2 02:50:37 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 01 December 2002 05:31, George Staikos wrote:
> It seems that something in recent times (must have been in the past month) 
> horribly broke www.aircanada.ca.  I can no longer enter anything in the form, 

The problem is setting the text on an empty HTMLOptionElement.
KJS has code for it (since the DOM forbids it, it's implemented in ecma/kjs_html.cpp,
see "// No child text node found, creating one" in that file).

Testcase:

<html>
<body onload="init()">
        <form name="myform">
                <select name="sel">
                        <option></option>
                        <option></option>
                        <option></option>
                        <option></option>
                </select>
        </form>
        <script>
        function init() {
                document.myform.sel.options[0].text="Hello";
                document.myform.sel.options[1].text="World";
        }
        </script>
</body>
</html>

Note that it works if init() is called directly (as opposed to being
called by onload). So it sounds like a problem with dynamic updating.
I tried adding a setChanged(), but it didn't help.

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE96sp+72KcVAmwbhARAgFjAJ9giMA9eCADU9K1y0Tdd75uLGXKKQCeJAaU
UlF5sBuO6i3y96FzPPneVsk=
=HE+w
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list