Browse Source

Fix double scrollbar in compose window with big body (#9484, #7760)

If editing a draft, that has a lot of text content already, previously
sometimes a double scrollbar was shown, because the callback function
that calculates the height for the textare was triggered too early.

This change sets the first height calculation behind a 100ms timeout.
(A 0ms timeout might be feasible, too, just to put the callback
execution on the call stack – it also works locally, but I'm not sure
about real world behaviour, so better be safe than sorry.)
pull/9518/head
Pablo Zmdl 1 year ago
committed by Aleksander Machniak
parent
commit
f6a5e758df
  1. 3
      skins/elastic/ui.js

3
skins/elastic/ui.js

@ -3945,7 +3945,8 @@ function rcube_elastic_ui()
}
};
$(textarea).on('input', resize).trigger('input');
$(textarea).on('input', resize);
setTimeout(resize, 100);
};
// Initializes smart list input

Loading…
Cancel
Save