[bug] fix edge rendering when page is scrolled

This commit is contained in:
Kuldeep M 2019-07-03 19:12:44 +01:00
parent f43587e496
commit f2b6aeedc5
3 changed files with 6 additions and 4 deletions

View File

@ -21,11 +21,13 @@ var edge = (function() {
options = helper.applyOptions(options, override); options = helper.applyOptions(options, override);
}; };
var _resize = function() { var _resize = function() {
var scrollTop = document.documentElement.scrollTop;
var scrollLeft = document.documentElement.scrollLeft;
var rect = options.element.getBoundingClientRect(); var rect = options.element.getBoundingClientRect();
_currentEdge.style.width = rect.width + "px"; _currentEdge.style.width = rect.width + "px";
_currentEdge.style.height = rect.height + "px"; _currentEdge.style.height = rect.height + "px";
_currentEdge.style.top = rect.top + "px"; _currentEdge.style.top = rect.top + scrollTop + "px";
_currentEdge.style.left = rect.left + "px"; _currentEdge.style.left = rect.left + scrollLeft + "px";
}; };
var _makeEdge = function() { var _makeEdge = function() {
helper.setObject({ helper.setObject({

View File

@ -1,6 +1,6 @@
var version = (function() { var version = (function() {
var current = "3.30.3"; var current = "3.30.4";
var compare = function(a, b) { var compare = function(a, b) {
var pa = a.split("."); var pa = a.split(".");

View File

@ -2,7 +2,7 @@
"name": "nightTab", "name": "nightTab",
"short_name": "nightTab", "short_name": "nightTab",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"version": "3.30.3", "version": "3.30.4",
"manifest_version": 2, "manifest_version": 2,
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "index.html" "newtab": "index.html"