SVN commit 873679 by ggarand: automatically merged revision 873660: Partly fix the scroll event dispatching, so that window.onscroll works. There are still some aspects of the dispatching that don't work as they should though. (fix /.'s floating comment box) M +6 -2 khtmlview.cpp --- branches/KDE/4.1/kdelibs/khtml/khtmlview.cpp #873678:873679 @@ -3916,8 +3916,12 @@ scheduleRepaint(0, 0, 0, 0); } - if (m_part->xmlDocImpl() && m_part->xmlDocImpl()->documentElement()) - m_part->xmlDocImpl()->documentElement()->dispatchHTMLEvent(EventImpl::SCROLL_EVENT, false, false); + if (m_part->xmlDocImpl() && m_part->xmlDocImpl()->documentElement()) { + // ### FIXME: there is something wrong with this event. + // With a capturing listener on document and window, window's should fire first, then document's. + // Also, this doesn't work:
+ m_part->xmlDocImpl()->documentElement()->dispatchWindowEvent(EventImpl::SCROLL_EVENT, false, false); + } if (QApplication::isRightToLeft()) dx = -dx;