All modern browsers trigger the input event and assign e.originalEvent.inputType to 'insertReplacementText' when applying spelling fixes, except for Safari, which uses e.originalEvent.inputType of 'insertText' and e.originalEvent.data of null.
With this in mind, we can have the tbwchange Trumbowyg event triggered on the editor when a spelling fix from the browser context menu is applied.
To test this, insert a textarea on a page and initialize, listening to the tbwchange event. Without the fix applying a spelling fix will not see the tbwchange event fired. With the fix, you see the tbwchange event fired
All modern browsers trigger the
input
event and assigne.originalEvent.inputType
to'insertReplacementText'
when applying spelling fixes, except for Safari, which usese.originalEvent.inputType
of'insertText'
ande.originalEvent.data
ofnull
.With this in mind, we can have the
tbwchange
Trumbowyg event triggered on the editor when a spelling fix from the browser context menu is applied.To test this, insert a textarea on a page and initialize, listening to the
tbwchange
event. Without the fix applying a spelling fix will not see thetbwchange
event fired. With the fix, you see thetbwchange
event firedfixes #1363