зеркало из https://github.com/mozilla/gecko-dev.git
Bug 773356 - Fix scrolling in enabled textareas in B2G. r=roc
Scrolling in disabled textareas still does not work; that's bug 780174.
This commit is contained in:
Родитель
0ae46980c5
Коммит
b0a3cbdea8
|
@ -117,20 +117,12 @@ const ContentPanning = {
|
|||
|
||||
let nodeContent = node.ownerDocument.defaultView;
|
||||
while (!(node instanceof Ci.nsIDOMHTMLBodyElement)) {
|
||||
let style = nodeContent.getComputedStyle(node, null);
|
||||
|
||||
let overflow = [style.getPropertyValue('overflow'),
|
||||
style.getPropertyValue('overflow-x'),
|
||||
style.getPropertyValue('overflow-y')];
|
||||
|
||||
let rect = node.getBoundingClientRect();
|
||||
let isAuto = (overflow.indexOf('auto') != -1 &&
|
||||
(rect.height < node.scrollHeight ||
|
||||
rect.width < node.scrollWidth));
|
||||
|
||||
let isScroll = (overflow.indexOf('scroll') != -1);
|
||||
if (isScroll || isAuto)
|
||||
if (node.scrollHeight > node.clientHeight ||
|
||||
node.scrollWidth > node.clientWidth ||
|
||||
('scrollLeftMax' in node && node.scrollLeftMax > 0) ||
|
||||
('scrollTopMax' in node && node.scrollTopMax > 0)) {
|
||||
return [node, this._generateCallback(node)];
|
||||
}
|
||||
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче