[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.3/kdelibs/khtml
From: Maks Orlovich <maksim () kde ! org>
Date: 2009-09-30 20:58:04
Message-ID: 1254344284.442082.13730.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1029833 by orlovich:
Merged revision:r1029831 | orlovich | 2009-09-30 16:39:30 -0400 (Wed, 30 Sep 2009) | 13 lines
Prevent double-dispatch of events file upload lineedit does not accept.
(One directly to lineedit, one via DOM on the containing upload widget).
Fixes double-upload-dialogs-on-enter bug. I think in general the bubbling
behavior of Qt when it comes to events is problematic --- we should
probably always accept events at original level and route them manually
to avoid issues. (This requires moving top-level shortcut handling
from KHTMLView to ElementImpl::defaultEventHandler with a check
for being the documentElement)
BUG: 192755
M +11 -0 khtmlview.cpp
--- branches/KDE/4.3/kdelibs/khtml/khtmlview.cpp #1029832:1029833
@@ -2289,6 +2289,17 @@
keyReleaseEvent(ke);
block = true;
}
+
+ if (qobject_cast<KUrlRequester*>(w->parentWidget()) &&
+ e->type() == QEvent::KeyPress) {
+ // Since keypress events on the upload widget will
+ // be forwarded to the lineedit anyway,
+ // block the original copy at this level to prevent
+ // double-emissions of events it doesn't accept
+ e->ignore();
+ block = true;
+ }
+
break;
case QEvent::FocusIn:
case QEvent::FocusOut:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic