From 2daa9f8658164499168dc2f30b21619f4b5b592c Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 17 Feb 2017 10:57:56 +0100 Subject: [PATCH] Link to main page was opened in the inner iframe --- www/common/toolbar.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/common/toolbar.js b/www/common/toolbar.js index c1c70a1bb..e082945a6 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -321,7 +321,17 @@ define([ var $span = $('').text('CryptPad'); var $aTagBig = $aTagSmall.clone().addClass('large').append($span); $aTagSmall.addClass('narrow'); + var onClick = function (e) { + e.preventDefault(); + if (e.ctrlKey) { + window.open('/'); + return; + } + window.location = "/"; + }; + $aTagBig.click(onClick); + $aTagSmall.click(onClick); $linkContainer.append($aTagSmall).append($aTagBig); };