1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 21:18:00 +01:00

Fix some scrollable element search corner cases. Closes issue #188.

This commit is contained in:
Kris Maglione
2010-12-17 04:52:39 -05:00
parent d6fc8c5cb5
commit 449bcfa8a2

View File

@@ -1121,7 +1121,7 @@ const Buffer = Module("buffer", {
overflow = "overflowX", border1 = "borderLeftWidth", border2 = "borderRightWidth"; overflow = "overflowX", border1 = "borderLeftWidth", border2 = "borderRightWidth";
let style = util.computedStyle(elem); let style = util.computedStyle(elem);
let borderSize = parseInt(style[border1]) + parseInt(style[border2]); let borderSize = Math.round(parseFloat(style[border1]) + parseFloat(style[border2]));
let realSize = elem[size]; let realSize = elem[size];
// Stupid Gecko eccentricities. May fail for quirks mode documents. // Stupid Gecko eccentricities. May fail for quirks mode documents.
if (elem[size] + borderSize == elem[max] || elem[size] == 0) // Stupid, fallible heuristic. if (elem[size] + borderSize == elem[max] || elem[size] == 0) // Stupid, fallible heuristic.