Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
fix(TCMention): emit editableInput event in selectMentionCallback
Browse files Browse the repository at this point in the history
* Closes #6
  • Loading branch information
tomchentw committed Feb 20, 2016
1 parent c71f239 commit 6bf2172
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,16 @@ export const TCMention = MediumEditor.Extension.extend({
textNode.textContent = seletedText;
MediumEditor.selection.select(this.document, textNode, seletedText.length);
//
// If one of our contenteditables currently has focus, we should
// attempt to trigger the 'editableInput' event
const target = this.base.getFocusedElement();
if (target) {
this.base.events.updateInput(target, {
target,
currentTarget: target,
});
}
//
this.hidePanel(false);
} else {
this.hidePanel(false);
Expand Down

0 comments on commit 6bf2172

Please sign in to comment.