From 41c958d450973c642733efda10a1a6fe3aedde5e Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Tue, 11 Apr 2017 10:53:06 +0200 Subject: [PATCH] Properly restore the default style Setting a style to null does restore it in FF, Chrome, Safari and Edge. But it does not work in Internet Explorer. The proper way to restore to default values is to set it to the empty string. This works in all browsers. Fixes issue #808. --- app/ui.js | 2 +- core/util/events.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui.js b/app/ui.js index 46826221..91f056a3 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1672,7 +1672,7 @@ const UI = { // Force Chrome to recalculate the layout by asking for // an element's dimensions screen.getBoundingClientRect(); - screen.style.overflow = null; + screen.style.overflow = ""; }, updateDesktopName: function(rfb, name) { diff --git a/core/util/events.js b/core/util/events.js index 8fdf6aa6..d5e6de9e 100644 --- a/core/util/events.js +++ b/core/util/events.js @@ -115,7 +115,7 @@ export function setCapture (elem) { _captureObserver.observe(elem, {attributes:true}); _captureElemChanged(); - captureElem.style.display = null; + captureElem.style.display = ""; // We listen to events on window in order to keep tracking if it // happens to leave the viewport