Skip to content

Commit

Permalink
Addressed CI issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek committed Jan 22, 2025
1 parent f955b6e commit 01f41cd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/ckeditor5-emoji/src/emojimention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class EmojiMention extends Plugin {
itemElement.classList.add( 'ck-button_with-text' );
itemElement.id = `mention-list-item-id${ item.id.slice( 0, -1 ) }`;
itemElement.type = 'button';
itemElement.tabIndex = '-1';
itemElement.tabIndex = -1;

const labelElement = document.createElement( 'span' );

Expand All @@ -169,9 +169,6 @@ export default class EmojiMention extends Plugin {
* Overrides the default mention execute listener to insert an emoji as plain text instead.
*/
private _overrideMentionExecuteListener() {
const editor = this.editor;
const emojiPickerPlugin = this._emojiPickerPlugin;

this.editor.commands.get( 'mention' )!.on( 'execute', ( event, data ) => {
const eventData = data[ 0 ];

Expand All @@ -195,11 +192,11 @@ export default class EmojiMention extends Plugin {
.map( item => item.data )
.reduce( ( result, text ) => result + text, '' );

editor.model.change( writer => {
editor.model.deleteContent( writer.createSelection( eventData.range ) );
this.editor.model.change( writer => {
this.editor.model.deleteContent( writer.createSelection( eventData.range ) );
} );

emojiPickerPlugin.showUI( text.slice( 1 ) );
this._emojiPickerPlugin!.showUI( text.slice( 1 ) );
} else {
editor.model.change( writer => {
editor.model.insertContent( writer.createText( eventData.mention.text ), eventData.range );
Expand Down

0 comments on commit 01f41cd

Please sign in to comment.