fix: Selection passed to setSelection must point at the current document, triple clicking caption
This commit is contained in:
@@ -136,9 +136,11 @@ export default class SimpleImage extends Node {
|
||||
};
|
||||
|
||||
handleMouseDown = (ev: React.MouseEvent<HTMLParagraphElement>) => {
|
||||
// always prevent clicks in caption from bubbling to the editor
|
||||
ev.stopPropagation();
|
||||
|
||||
if (document.activeElement !== ev.currentTarget) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
ev.currentTarget.focus();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user