Bug 48230

Summary: [Qt] Impossible to retrieve user changed value from INPUT type text element
Product: WebKit Reporter: mike <mikelupow>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Major CC: benjamin
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: S60 Hardware   
OS: S60 3rd edition   

mike
Reported 2010-10-25 05:03:38 PDT
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]
Attachments
Benjamin Poulain
Comment 1 2011-01-28 19:07:36 PST
Please follow http://trac.webkit.org/wiki/QtWebKitBugs when reporing bugs. Is this really S60 specific? *** This bug has been marked as a duplicate of bug 32865 ***
Note You need to log in before you can comment on or make changes to this bug.