[patch] make enter/return on a link activate the onclick() javascript
Luciano Montanaro
mikelima at cirulla.net
Wed Oct 19 12:06:10 BST 2005
El Jueves, 12 de Mayo de 2005 11:26, Luciano Montanaro escribió:
> El Miércoles 11 Mayo 2005 19:59, Leo Savernik escribió:
> > Am Mittwoch, 11. Mai 2005 19:01 schrieb Luciano Montanaro:
> > > Again, this is one line, and I'm not too sure its' correct.
> > > It seems to work, though.
> >
> > Looks good.
>
> Ok, I'll commit it later today, then.
> Here is a page that can be used to check the problem:
>
> http://www.cirulla.net/listing/html-tests/test_alert.html
It turned out the implementation was not so good, after all.
See bug #112585 (I forgot this was my doing)
http://bugs.kde.org/show_bug.cgi?id=112585
I have just attached a patch for it to the bug report.
Here it is:
Index: html_inlineimpl.cpp
===================================================================
--- html_inlineimpl.cpp (revision 471936)
+++ html_inlineimpl.cpp (working copy)
@@ -146,14 +146,17 @@
state |= Qt::AltButton;
if ( k->checkModifier(Qt::ControlButton) )
state |= Qt::ControlButton;
- click();
}
// ### also check if focused node is editable if not in
designmode,
// and prevent link loading then (LS)
- if (getDocument()->view() && !getDocument()->designMode())
+ if (getDocument()->view() && !getDocument()->designMode()) {
+ if (k)
+ click();
+ else
getDocument()->view()->part()->
urlSelected( url, button, state, utarget );
+ }
}
evt->setDefaultHandled();
}
I'll commit this later today, if there is no objection, and close the bug.
Luciano
>
> > mfg
> > Leo
--
Luciano Montanaro //
\\ //
\x/ www.cirulla.net
More information about the kfm-devel
mailing list