Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When creating a decorator component that returns an Anchor with a href the editor caret will jump to the start of the decorated component after the second character match.
When deleting the final character of the decorated component the Draft editor will crash.

A simple codesandbox example can be found here:
https://codesandbox.io/s/draft-js-v011-hash-with-link-example-yuiod
Some of my observations are as follows:
- Removing the href from the anchor will no longer result in the caret errors or crashing.
- In Draft v0.10.5 whenever a decorated component's match changes it will have its render method called.
- In Draft v0.11 the render method is only called when the match is first created, when it's 'exited' or when backspace is pressed.
This behaviour would cause issues with components that rely on the matched string for some of their properties. For example creating a link when the text matches a URL (such as Draft JS Plugins' Linkify plugin).
Those examples can be found here:
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
- Draft.js v0.11 (worked in v0.10.5)
- Safari v12.1 & Chrome v75
Note: Firefox does not crash and appears to work OK in this example, however its render method isn't called when the match changes.