[Webkit-unassigned] [Bug 32865] New: [Qt] QWebElement::attribute always returns empty result for input's values
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 22 03:46:02 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32865
Summary: [Qt] QWebElement::attribute always returns empty
result for input's values
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebKit Qt
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: andy.nichols at nokia.com
Created an attachment (id=45380)
--> (https://bugs.webkit.org/attachment.cgi?id=45380)
Example to demonstrat problem
How to reproduce the bug:
1) Create simple application with QWebView and button. Add slot for button
click event with code like the following:
void onTestClick()
{
QWebFrame* curFrame = m_webview->page()->currentFrame();
if (curFrame)
{
QWebElement elem = curFrame->documentElement().findFirst("#login");
if (!elem.isNull())
{
QString ret = elem.attribute("value", "nothing :(");
QMessageBox::information(0, "Result", ret, QMessageBox::Ok);
}
}
}
2) Load any web page which contains <input> element with attribute "id" defined
(for example <input id="login" name="login"/>)
3) Enter any text to this field and press button. Messagebox will be shown but
displayed text always will be "nothing :("
Note that if you inject JQuery to the page in slot connected to loadFinished()
signal and place the following code to onTestClick():
QString ret =
m_webview->evaluateJavaScript("$('#login').attr('value')").toString();
QMessageBox::information(0, "Result", ret, QMessageBox::Ok);
value will be extracted correctly.
--
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