Gleicher Bug wie in der floatingspace toolbar, hier aber einfacher zu
fixen, weil wir den Code nicht minifien müssen.
Ausserdem wir dder layout Call hier nicht durch einen buffer gejadgt,
und muss deshalb auch nicht detacht werden. Ansonsten analog zu der
Beschreibung da.
egw 12629
(cherry picked from commit
9eb2f5e8af80cc62ff070f950c5344f36e1dfba5)
(cherry pick von odyn)
+ function parentScroll(e) {
+ var position = e.$.getAttribute("position"),
+ excludeStaticParent = position === "absolute";
+ return e.getParents().filter( function(parent) {
+ var style = window.getComputedStyle(parent.$);
+ if ( excludeStaticParent && style.position === "static" )
+ return false;
+ return (/(auto|scroll)/).test( style['overflow'] + style["overflow-y"] + style["overflow-x"] );
+ });
+ };
+
function attach( editor ) {
function attach( editor ) {
- var config = editor.config;
+ var config = editor.config,
+ parent = parentScroll(editor.element);
var resize = function (width, height) {
var editable;
var resize = function (width, height) {
var editable;
+ parent.forEach(function(e){
+ e.on('scroll', function (evt) { layout(evt) });
+ });
+
editor.on( 'blur', function() {
float_space.hide();
} );
editor.on( 'blur', function() {
float_space.hide();
} );