diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ddfdaf339..ebd4a4137 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -303,6 +303,15 @@ define([ }, 10); }); + Common.Utils.isChrome && $(document.body).on('keydown', 'textarea', function(e) {// chromium bug890248 (Bug 39614) + if (e.keyCode===Common.UI.Keys.PAGEUP || e.keyCode===Common.UI.Keys.PAGEDOWN) { + setTimeout(function(){ + $('#viewport').scrollLeft(0); + $('#viewport').scrollTop(0); + }, 0); + } + }); + Common.NotificationCenter.on({ 'modal:show': function(){ Common.Utils.ModalWindow.show(); diff --git a/apps/documenteditor/main/resources/less/layout.less b/apps/documenteditor/main/resources/less/layout.less index 7aeca23cc..61bac8163 100644 --- a/apps/documenteditor/main/resources/less/layout.less +++ b/apps/documenteditor/main/resources/less/layout.less @@ -41,6 +41,7 @@ label { background-color: @background-toolbar-ie; background-color: @background-toolbar; overflow: hidden; + scroll-behavior: smooth; // chromium bug890248 (Bug 39614) } .layout-region { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 317aa99f1..fb233c49e 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -264,6 +264,15 @@ define([ } }); + Common.Utils.isChrome && $(document.body).on('keydown', 'textarea', function(e) {// chromium bug890248 (Bug 39614) + if (e.keyCode===Common.UI.Keys.PAGEUP || e.keyCode===Common.UI.Keys.PAGEDOWN) { + setTimeout(function(){ + $('#viewport').scrollLeft(0); + $('#viewport').scrollTop(0); + }, 0); + } + }); + Common.NotificationCenter.on({ 'modal:show': function(e){ Common.Utils.ModalWindow.show(); diff --git a/apps/presentationeditor/main/resources/less/layout.less b/apps/presentationeditor/main/resources/less/layout.less index 6e071fd0c..7128459d9 100644 --- a/apps/presentationeditor/main/resources/less/layout.less +++ b/apps/presentationeditor/main/resources/less/layout.less @@ -51,6 +51,7 @@ label { background-color: @background-toolbar-ie; background-color: @background-toolbar; overflow: hidden; + scroll-behavior: smooth; // chromium bug890248 (Bug 39614) } .layout-region { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index dd5e3385c..574c767e9 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -299,6 +299,14 @@ define([ } }); + Common.Utils.isChrome && $(document.body).on('keydown', 'textarea', function(e) {// chromium bug890248 (Bug 39614) + if (e.keyCode===Common.UI.Keys.PAGEUP || e.keyCode===Common.UI.Keys.PAGEDOWN) { + setTimeout(function(){ + $('#viewport').scrollLeft(0); + $('#viewport').scrollTop(0); + }, 0); + } + }); Common.NotificationCenter.on({ 'modal:show': function(e){ Common.Utils.ModalWindow.show(); diff --git a/apps/spreadsheeteditor/main/resources/less/layout.less b/apps/spreadsheeteditor/main/resources/less/layout.less index b88d75590..1bf1a43c8 100644 --- a/apps/spreadsheeteditor/main/resources/less/layout.less +++ b/apps/spreadsheeteditor/main/resources/less/layout.less @@ -35,6 +35,7 @@ label { background-color: @background-toolbar-ie; background-color: @background-toolbar; overflow: hidden; + scroll-behavior: smooth; // chromium bug890248 (Bug 39614) } .layout-region {