diff options
| author | gdh1995 | 2016-12-22 22:24:28 +0800 |
|---|---|---|
| committer | gdh1995 | 2017-01-03 16:44:41 +0800 |
| commit | c288100d9ea5c09efa14b0d4d32ee87b077b8588 (patch) | |
| tree | 6289e7846dd6317a1549865889a1920fb31adcff /lib | |
| parent | 0338c08ed7a15e11363b6218da8cb495b769ecfa (diff) | |
| download | vimium-c288100d9ea5c09efa14b0d4d32ee87b077b8588.tar.bz2 | |
getViewportTopLeft: consider the new style "contain"
If an element's `contain` is/contains `paint`, then it will be forced
showing just as its `position` is `relative`.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dom_utils.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index d39ce1de..7232bb45 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -290,7 +290,7 @@ DomUtils = getViewportTopLeft: -> style = getComputedStyle document.documentElement - if style.position == "static" + if style.position == "static" and not /content|paint|strict/.test(style.contain or "") zoom = +style.zoom || 1 top: Math.ceil(window.scrollY / zoom), left: Math.ceil(window.scrollX / zoom) else |
