Bug 561979 - Scrolling with mouse dragging does not work when cursor is over span element with 'overflow:auto' style; r=arpad.borsos

This commit is contained in:
Alice0775 White 2010-04-27 11:32:20 +02:00
parent 267f55a865
commit d7db8cb4ea

View File

@ -825,13 +825,15 @@
// we already discarded non-multiline selects so allow vertical
// scroll for multiline ones directly without checking for a
// overflow property
var scrollVert = this._scrollable.scrollHeight > this._scrollable.clientHeight &&
var scrollVert = this._scrollable.clientHeight > 0 &&
this._scrollable.scrollHeight > this._scrollable.clientHeight &&
(this._scrollable instanceof HTMLSelectElement ||
scrollingAllowed.indexOf(overflowy) >= 0);
// do not allow horizontal scrolling for select elements, it leads
// to visual artifacts and is not the expected behavior anyway
if (!(this._scrollable instanceof HTMLSelectElement) &&
this._scrollable.clientWidth > 0 &&
this._scrollable.scrollWidth > this._scrollable.clientWidth &&
scrollingAllowed.indexOf(overflowx) >= 0) {
this._autoScrollPopup.setAttribute("scrolldir", scrollVert ? "NSEW" : "EW");