[wp-trac] [WordPress Trac] #57995: Popup flickering in Firefox
WordPress Trac
noreply at wordpress.org
Tue Mar 28 06:16:02 UTC 2023
#57995: Popup flickering in Firefox
--------------------------+-----------------------------
Reporter: robehr79 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 6.1.1
Severity: major | Keywords:
Focuses: |
--------------------------+-----------------------------
This bug is somehow related to #44911, however, 5 years after that, the
bug appears in Firefox. I copy-paste here what I wrote in the forum
(https://wordpress.org/support/topic/toolbar-of-tinymce-flickering-in-
firefox/):
I found the releavant code in the 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 on
resize, 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57995>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list