From bb2317d8e6d5ff7d3b9504b1afb398a4357164a6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 7 Oct 2016 17:41:52 +0200 Subject: [PATCH] fix chrome style bug by forcing reload of style sheet --- www/common/cryptpad-common.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 58bc11244..0ac006b3d 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -767,6 +767,7 @@ define([ } }); $("#cryptpad-readonly-open").click(function() { + common.findOKButton().click(); window.open(url); }); @@ -805,7 +806,11 @@ define([ */ var styleAlerts = common.styleAlerts = function (href) { var $link = $('link[href="/customize/alertify.css"]'); - if ($link.length) { return; } + if ($link.length) { + $link.attr('href', ''); + $link.attr('href', '/customize/alertify.css'); + return; + } href = href || '/customize/alertify.css'; $('head').append($('', { @@ -845,6 +850,7 @@ define([ }; common.alert = function (msg, cb) { + common.styleAlerts(); cb = cb || function () {}; var keyHandler = listenForKeys(function (e) { // yes findOKButton().click(); @@ -856,6 +862,7 @@ define([ }; common.prompt = function (msg, def, cb, opt) { + common.styleAlerts(); opt = opt || {}; cb = cb || function () {}; @@ -879,6 +886,7 @@ define([ }; common.confirm = function (msg, cb, opt) { + common.styleAlerts(); opt = opt || {}; cb = cb || function () {}; var keyHandler = listenForKeys(function (e) {