Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
kdelibs4
patch-r896002.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File patch-r896002.diff of Package kdelibs4
Subject: fix khtml pressing tab doesn't move focus away from a drop-down box From: wstephenson@suse.de Bug: kde:156164 Patch-upstream: 896002 --- khtml/rendering/render_form.h (revision 896001) +++ khtml/rendering/render_form.h (revision 896002) @@ -413,6 +413,7 @@ public: protected: virtual bool event(QEvent *); virtual bool eventFilter(QObject *dest, QEvent *e); + virtual void keyPressEvent(QKeyEvent *e); virtual void showPopup(); virtual void hidePopup(); }; --- khtml/rendering/render_form.cpp (revision 896001) +++ khtml/rendering/render_form.cpp (revision 896002) @@ -1206,6 +1206,7 @@ bool ComboBoxWidget::eventFilter(QObject { 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. @@ -1221,6 +1222,20 @@ bool ComboBoxWidget::eventFilter(QObject 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) --- khtml/rendering/render_replaced.cpp (revision 896001) +++ khtml/rendering/render_replaced.cpp (revision 896002) @@ -854,6 +854,7 @@ bool RenderWidget::eventFilter(QObject* } 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) ); Index: khtml/rendering/render_form.h =================================================================== Index: khtml/rendering/render_form.cpp =================================================================== Index: khtml/rendering/render_replaced.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor