[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: khtml regression
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-12-02 2:50:37
[Download RAW message or body]

-----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@mandrakesoft.com, faure@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-----

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic