[Webkit-unassigned] [Bug 48230] New: Impossible to retrieve user changed value from INPUT type text element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 25 05:03:38 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=48230

           Summary: Impossible to retrieve user changed value from INPUT
                    type text element
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: S60 Hardware
        OS/Version: S60 3rd edition
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mikelupow at aol.com


This was originally reported by André Pareis via http://bugreports.qt.nokia.com/browse/QTWEBKIT-88
May be related to: 
https://bugs.webkit.org/show_bug.cgi?id=32865


---
In the code below it is not possible to get the "value" attribute of the INPUT tag after it was changed by the user. 
You can try it yourself: change the value of the first input element and then click somewhere to get the dump. You will always get the original value "bla".

You can also see that the value of the second input is updated correctly by the JavaScript snippet. But this change is also never seen in C++. 


[code]
#include <QtGui/QApplication>
#include <QtWebKit/QWebView>
#include <QtWebKit/QWebFrame>
#include <QtWebKit/QWebElement>
#include <QtCore/QDebug>
#include <QtCore/QDateTime>



class MyWebView: public QWebView {

public:

    void mouseReleaseEvent(QMouseEvent *e) {
        qDebug() << "clicked" << QDateTime::currentDateTime().toString();
        dump(page()->currentFrame()->findFirstElement("#input1"));
        dump(page()->currentFrame()->findFirstElement("#input2"));
    }

    void dump(const QWebElement& el) {
        qDebug() << QString("%1").arg(el.toOuterXml());
        QStringList attrs(el.attributeNames());
        QStringListIterator i(attrs);
        while(i.hasNext()) {
            QString a(i.next());
            qDebug() << QString("  %1 = %2").arg(a).arg(el.attribute(a));
        }
        qDebug() << QString("</%1>").arg(el.tagName().toLower());
    }
};

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MyWebView v;
    v.setHtml("<html><head></head><body><form><input id=\"input1\" name=\"input1\" type=\"text\" value=\"bla\" onchange=\"document.getElementById('input2').value = document.getElementById('input1').value\"/><input id=\"input2\" name=\"input2\" type=\"text\" /></form></body></html>");
    v.show();
    return a.exec();
}
[/code]

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


More information about the webkit-unassigned mailing list