mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix scroll issue in rich text pads #406
This commit is contained in:
parent
26765596e4
commit
3f632f90f6
@ -1,5 +1,6 @@
|
||||
@import (reference) "../../customize/src/less2/include/framework.less";
|
||||
@import (reference) "../../customize/src/less2/include/comments.less";
|
||||
@import (reference) "../../customize/src/less2/include/tools.less";
|
||||
|
||||
body.cp-app-pad {
|
||||
.framework_main(
|
||||
@ -39,6 +40,9 @@ body.cp-app-pad {
|
||||
.cke_button__print {
|
||||
display: none !important;
|
||||
}
|
||||
.cke_button {
|
||||
.tools_unselectable();
|
||||
}
|
||||
}
|
||||
.cke_wysiwyg_frame {
|
||||
width: 100%;
|
||||
|
||||
@ -10,6 +10,8 @@ define(['jquery'], function ($) {
|
||||
CKEDITOR.tools.callFunction(Number(m[1]), e.currentTarget);
|
||||
});
|
||||
|
||||
var $iframe = $('iframe').contents().find('html');
|
||||
|
||||
// Buttons
|
||||
var $a = $('.cke_toolbox_main').find('.cke_button, .cke_combo_button');
|
||||
$a.each(function (i, el) {
|
||||
@ -24,7 +26,9 @@ define(['jquery'], function ($) {
|
||||
if (!m) { return; }
|
||||
var f = m[1];
|
||||
var arg = m[2] === "this" ? el : e.originalEvent;
|
||||
var s = $iframe.scrollTop();
|
||||
CKEDITOR.tools.callFunction(Number(f), arg);
|
||||
$iframe.scrollTop(s);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user