- Affected version
- 2.3.13
XenForo version: 2.3.13
Browser: Microsoft Edge (current). Does not happen in Safari.
Steps to reproduce:
Expected: toolbar icons stay still while typing.
Actual: the Align dropdown icon blinks on every key press.
Likely cause: Froala's align plugin
Suggested fix (untested): only swap the icon when the alignment changes, e.g.
Browser: Microsoft Edge (current). Does not happen in Safari.
Steps to reproduce:
- Open any reply or new thread editor.
- Type in the editor.
Expected: toolbar icons stay still while typing.
Actual: the Align dropdown icon blinks on every key press.
Likely cause: Froala's align plugin
refresh() (js/vendor/froala) runs on each toolbar refresh and always replaces the button's icon element, even when the alignment hasn't changed:
JavaScript:
c.find("> *").first().replaceWith(b.icon.create("align-" + alignment))
Suggested fix (untested): only swap the icon when the alignment changes, e.g.
JavaScript:
refresh: function ($btn) {
var blocks = this.selection.blocks();
if (!blocks.length) return;
var alignment = this.helpers.getAlignment($(blocks[0]));
if ($btn.data('xfAlign') === alignment) return;
$btn.data('xfAlign', alignment);
$btn.find('> *').first().replaceWith(this.icon.create('align-' + alignment));
}