Merge pull request #1562 from ONLYOFFICE/fix/bugfix

Fix bug with page up/page down in textarea (Bug 39614)
This commit is contained in:
Julia Radzhabova 2022-02-14 14:22:28 +03:00 committed by GitHub
commit c605a302b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 0 deletions

View file

@ -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();

View file

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

View file

@ -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();

View file

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

View file

@ -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();

View file

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