[PATCH] Input type=image submission
Dirk Mueller
mueller at kde.org
Wed Jun 18 00:42:44 BST 2003
On Die, 17 Jun 2003, Ralf Hoelzer wrote:
> form can only be submitted by clicking on the "Login" buttton, which is an
> "input type=image" button. If you submit by pressing enter, you will get an
> error message from their site.
Thanks for the patch, but you remove the m_clicked test .. does it work with
the attached patch?
--
Dirk
-------------- next part --------------
Index: html_formimpl.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/html/html_formimpl.cpp,v
retrieving revision 1.323
diff -u -5 -d -p -r1.323 html_formimpl.cpp
--- html_formimpl.cpp 17 May 2003 01:00:11 -0000 1.323
+++ html_formimpl.cpp 17 Jun 2003 23:42:40 -0000
@@ -1165,21 +1165,21 @@ bool HTMLInputElementImpl::encoding(cons
// those buttons are never successful
return false;
case IMAGE:
- if(m_clicked && clickX() != -1)
+ if(m_clicked)
{
m_clicked = false;
QString astr(nme.isEmpty() ? QString::fromLatin1("x") : nme + ".x");
encoding += fixUpfromUnicode(codec, astr);
- astr.setNum(clickX());
+ astr.setNum(KMAX( clickX(), 0 ));
encoding += fixUpfromUnicode(codec, astr);
astr = nme.isEmpty() ? QString::fromLatin1("y") : nme + ".y";
encoding += fixUpfromUnicode(codec, astr);
- astr.setNum(clickY());
+ astr.setNum(KMAX( clickY(), 0 ) );
encoding += fixUpfromUnicode(codec, astr);
return true;
}
break;
More information about the kfm-devel
mailing list