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.
This commit is contained in:
Samuel Mannehed 2017-04-11 10:53:06 +02:00
parent dd44a8ead8
commit 41c958d450
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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