<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>48230</bug_id>
          
          <creation_ts>2010-10-25 05:03:38 -0700</creation_ts>
          <short_desc>[Qt] Impossible to retrieve user changed value from INPUT type text element</short_desc>
          <delta_ts>2011-01-28 19:07:36 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>S60 Hardware</rep_platform>
          <op_sys>S60 3rd edition</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>32865</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="mike">mikelupow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>298794</commentid>
    <comment_count>0</comment_count>
    <who name="mike">mikelupow</who>
    <bug_when>2010-10-25 05:03:38 -0700</bug_when>
    <thetext>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 &quot;value&quot; 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 &quot;bla&quot;.

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 &lt;QtGui/QApplication&gt;
#include &lt;QtWebKit/QWebView&gt;
#include &lt;QtWebKit/QWebFrame&gt;
#include &lt;QtWebKit/QWebElement&gt;
#include &lt;QtCore/QDebug&gt;
#include &lt;QtCore/QDateTime&gt;



class MyWebView: public QWebView {

public:

    void mouseReleaseEvent(QMouseEvent *e) {
        qDebug() &lt;&lt; &quot;clicked&quot; &lt;&lt; QDateTime::currentDateTime().toString();
        dump(page()-&gt;currentFrame()-&gt;findFirstElement(&quot;#input1&quot;));
        dump(page()-&gt;currentFrame()-&gt;findFirstElement(&quot;#input2&quot;));
    }

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

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MyWebView v;
    v.setHtml(&quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;form&gt;&lt;input id=\&quot;input1\&quot; name=\&quot;input1\&quot; type=\&quot;text\&quot; value=\&quot;bla\&quot; onchange=\&quot;document.getElementById(&apos;input2&apos;).value = document.getElementById(&apos;input1&apos;).value\&quot;/&gt;&lt;input id=\&quot;input2\&quot; name=\&quot;input2\&quot; type=\&quot;text\&quot; /&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;&quot;);
    v.show();
    return a.exec();
}
[/code]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>341943</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-01-28 19:07:36 -0800</bug_when>
    <thetext>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 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>