Version: 3.5.7 (using KDE 3.5.7, Debian Package 4:3.5.7.dfsg.1-1 (lenny/sid)) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.18-4-686 Konqueror/khtml supports the scroll event on window objects when the handler is attached with window.addEventListener. However, the DOM 0 equivalent, window.onscroll, does not work.
Created attachment 20974 [details] Example for non-functional window.onscroll
Created attachment 20975 [details] Example for working window.addEventListener('scroll', ...)
Yeah, we don't bind onscroll, just list it as an IE extension we don't handle. Should be easy enough to do.
Created attachment 22235 [details] patch. Not well-tested This makes us bind it... I wonder why it wasn't added before, though. We also seem to emit it on scrollwheel changes even if there is no scrollbar.
patch looks all fine but wouldn't that prevent an addEventListener path to be triggered? (and thus possibly end up having us identified as IE on some sites?) Which browsers support it? > We also seem to emit it on scrollwheel changes even if there is no scrollbar. it should check, in KHTMLView::scrollContentsBy(x,y), that the offset is non-zero before emitting the scroll event.
SVN commit 755002 by ggarand: Don't fire a scroll event if the view has been scrolled by a (0,0) delta. This happen when a view deprived of scrolling controls receives e.g. a wheel event. CCBUG: 147256 M +1 -1 khtmlview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=755002
This bug is still open in 4.0.1, and combined with bug 157375 break my webapp.
Handled in newer versions...