[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/rendering
From: Harri Porten <porten () kde ! org>
Date: 2008-12-12 8:43:08
Message-ID: 1229071388.079422.30109.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 896001 by porten:
Ony way to fix TAB getting stuck on option elements. Another
would be to reimplement handleEvent() and catch things there.
Fixes
BUG: 156164
and 7 duplicates.
M +15 -0 render_form.cpp
M +1 -0 render_form.h
M +1 -0 render_replaced.cpp
--- trunk/KDE/kdelibs/khtml/rendering/render_form.cpp #896000:896001
@@ -1392,6 +1392,7 @@
{
case Qt::Key_Tab:
forward=true;
+ // fall through
case Qt::Key_Backtab:
// ugly hack. emulate popdownlistbox() (private in QComboBox)
// we re-use ke here to store the reference to the generated event.
@@ -1407,6 +1408,20 @@
return KComboBox::eventFilter(dest, e);
}
+void ComboBoxWidget::keyPressEvent(QKeyEvent *e)
+{
+ // Normally, widgets are not sent Tab keys this way in the first
+ // place as they are handled by QWidget::event() for focus handling
+ // already. But we get our events via EventPropagator::sendEvent()
+ // directly. Ignore them so that HTMLGenericFormElementImpl::
+ // defaultEventHandler() can call focusNextPrev().
+ if (e->key() == Qt::Key_Tab || e->key() == Qt::Key_Backtab) {
+ e->ignore();
+ return;
+ }
+ KComboBox::keyPressEvent(e);
+}
+
// -------------------------------------------------------------------------
RenderSelect::RenderSelect(HTMLSelectElementImpl *element)
--- trunk/KDE/kdelibs/khtml/rendering/render_form.h #896000:896001
@@ -414,6 +414,7 @@
protected:
virtual bool event(QEvent *);
virtual bool eventFilter(QObject *dest, QEvent *e);
+ virtual void keyPressEvent(QKeyEvent *e);
virtual void showPopup();
virtual void hidePopup();
};
--- trunk/KDE/kdelibs/khtml/rendering/render_replaced.cpp #896000:896001
@@ -854,6 +854,7 @@
}
void RenderWidget::EventPropagator::sendEvent(QEvent *e) {
+ // ### why don't we just call event()? That would be the normal route.
switch(e->type()) {
case QEvent::Wheel:
wheelEvent ( static_cast<QWheelEvent *> (e) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic