Skip to content

Commit

Permalink
Fix related to #163
Browse files Browse the repository at this point in the history
  • Loading branch information
SerheyDolgushev committed Sep 29, 2020
1 parent 402bc7a commit b676083
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,23 @@ export default class EzBtnLinkEdit extends Component {
*/
showUI() {
const nativeEditor = this.props.editor.get('nativeEditor');
const element = nativeEditor.elementPath().lastElement;

nativeEditor.fire('editorInteraction', {
const eventOptions = {
editor: this.props.editor,
nativeEvent: {
editor: this.props.editor,
target: element.$,
},
selectionData: {
element: this.state.element,
region: this.getRegion(),
},
});
};
const path = nativeEditor.elementPath();

if (path) {
eventOptions.nativeEvent = {
editor: this.props.editor,
target: path.lastElement.$,
};
}

nativeEditor.fire('editorInteraction', eventOptions);
}

/**
Expand Down

0 comments on commit b676083

Please sign in to comment.