forked from rDrama/rDrama
remove unnecessary popups when adding # or ! to emoji
parent
b6cd61340f
commit
2f20fd1b3c
|
@ -137,12 +137,12 @@ function update_inline_emoji_modal(event)
|
|||
break;
|
||||
}
|
||||
|
||||
text = text.slice(0, event.target.selectionStart)
|
||||
let coords = text.indexOf(' ', box_coords.pos);
|
||||
|
||||
text = text.slice(0, coords === -1 ? text.length : coords)
|
||||
text = text.split('\n').slice(-1)
|
||||
|
||||
// Get current word at string, such as ":marse" or "word"
|
||||
let coords = text.indexOf(' ', box_coords.pos);
|
||||
current_word = /(^|\s|\+|-)([:!@][!#\w-]{2,}(?=\n|$))/.exec(text.slice(0, coords === -1 ? text.length : coords));
|
||||
current_word = /(^|\s|\+|-)([:!@][!#\w-]{2,}(?=\n|$))/.exec(text);
|
||||
|
||||
if (current_word) {
|
||||
current_word = current_word[2].toLowerCase();
|
||||
|
|
Loading…
Reference in New Issue