You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm a developer at Spruce Health, where we have customers complaining that TextExpander completion is buggy in our web application. We use Slate.js to power our composer text field, and have been able to reproduce the following behavior reported by customers:
What happens is that TextExpander attempts to select the whole abbreviation (say ;mych is the abbreviation), and then deletes it; however, it only selects part of the abbreviation (say, just the colon), which means the abbreviation doesn't get completely removed, and you end up with the replacement + part of the abbreviation (so in this case, google.com/something/healthcare/privacymych – note the trailing mych part at the end should have been replaced).
Please see attached video for a full demo and description.
Set up your TextExpander snippet as I've defined above
Type ;mych quickly into the Slate composer. Perhaps you'll have to type quickly, and try 2-3 times.
Observe the bug: that only part of the text seems to be replaced, where often mych is left (and the semi-colon deleted)
Expectation
I expect the whole abbreviation ;mych to be replaced. This works correctly on Firefox on Windows, and all macOS browsers (that I've tried thus far).
Environment
Slate Version: 0.101.1
Operating System: Windows 11
Browser: Edge (but I've reproduced on all Chromium browsers) – but it's working correctly on Firefox
Context
TextExpander 7.7.1
The text was updated successfully, but these errors were encountered:
I've also found that TextExpander rich text replacements also just straight up break the editor, happens on slatejs.org. I can't figure out how exactly they're inserting the content but it's uh.. not using the paste handler or triggering onDOMBeforeInput
Description
I'm a developer at Spruce Health, where we have customers complaining that TextExpander completion is buggy in our web application. We use Slate.js to power our composer text field, and have been able to reproduce the following behavior reported by customers:
TextExpander Snippet Content: google.com/something/healthcare/privacy
TextExpander Snippet Abbreviation: ;mych
What happens is that TextExpander attempts to select the whole abbreviation (say
;mych
is the abbreviation), and then deletes it; however, it only selects part of the abbreviation (say, just the colon), which means the abbreviation doesn't get completely removed, and you end up with the replacement + part of the abbreviation (so in this case,google.com/something/healthcare/privacymych
– note the trailingmych
part at the end should have been replaced).Please see attached video for a full demo and description.
This can be reproduced fairly easily in Slate.js's demo page:
https://www.slatejs.org/examples/richtext
Recording
Here's a very concise demo of the issue, which I'm recording on the Slate demo app on Edge in Windows:
https://github.com/ianstormtaylor/slate/assets/442307/7bd74607-9f83-40e4-b521-f83ff19b4e98
Here's a more in-depth video that shows how I have my abbreviation configured in TextExpander:
https://github.com/ianstormtaylor/slate/assets/442307/00888f3f-357c-440b-8922-22aa32fd81f6
Sandbox
This is fairly trivial to reproduce here on the demo website (it helps to type quickly, I think):
https://www.slatejs.org/examples/richtext
Steps
To reproduce the behavior:
;mych
quickly into the Slate composer. Perhaps you'll have to type quickly, and try 2-3 times.mych
is left (and the semi-colon deleted)Expectation
I expect the whole abbreviation
;mych
to be replaced. This works correctly on Firefox on Windows, and all macOS browsers (that I've tried thus far).Environment
Context
TextExpander 7.7.1
The text was updated successfully, but these errors were encountered: