-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Description
Hello. I am apologise if i duplicate the issue, but i don't found it in list of issue's.
I am using the AlloyEditor and today saw strange behaviour. I selected the text after this the toolbar is appears, then i clicked on the any place on the screen and the toolbar does not disappear.

I investigated how plugin works and understood the problem, the problem is that editor.status == "ready" and listener "contentDom" will not be called. That's means that listeners "mousedown" and "keydown" are not be added to document.
I fixed this problem, please see my changes in function componentDidMount().
if (editor && editor.status == "ready") {
document.addEventListener('mousedown', this._mousedownListener);
document.addEventListener('keydown', this._keyDownListener);
} else {
editor.once('contentDom', (function () {
document.addEventListener('mousedown', this._mousedownListener);
document.addEventListener('keydown', this._keyDownListener);
}).bind(this));
}
Reactions are currently unavailable