Toolbar of TinyMCE flickering in Firefox
-
Dear all,
Several users of our university reported this behaviour which is only reproducible in Firefox, but not on Chromium based web browsers:
- Begin editing a page
- Insert a Classic block (TinyMCE)
- Mark some text
- Turn it into a link
- Enter a URL which is wider than the input field, e.g.
https://de.wikipedia.org/wiki/Rindfleischetikettierungs%C3%BCberwachungsaufgaben%C3%BCbertragungsgesetz
- Close the input field
- Reopen the input field
- Click on the pencil to edit it
- Expected behaviour: Turn it into the input field again. Actual behaviour: Starts flickering and is impossible to work with.
I found the releavant the code in file
wp-include/js/tinymce/plugins/wordpress/plugin.js
in line 1127 and following, stating:/* * Showing a tooltip may trigger a
resize
event in Chromium browsers. * That results in a flicketing inline menu; tooltips are shown on hovering over a button, * which then hides the toolbar onresize
, then it repeats as soon as the toolbar is shown again. */ if ( event.type === 'resize' || event.type === 'resizewindow' ) {Funnily enough, there is a remark about this behaviour, but it concerns only Chromium. Firefox uses the event
scroll
. I tried appending it to the condition, and it really fixed the problem. However, I do not know if just appending|| event.type === 'scroll'
does not break other things. Actually, I think that the correct solution would be like this: The current condition is about resizing. There should be another condition which caches the previous scrolling position and bails out early if the scroll position did not change altough the event is fired.This code is present at least since WordPress 6.0 and also in 6.1.1.
Kind regards, Robert.
- The topic ‘Toolbar of TinyMCE flickering in Firefox’ is closed to new replies.