forked from MarseyWorld/MarseyWorld
fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4302260#context
parent
fedb366b6b
commit
21cd802ccb
|
@ -198,6 +198,9 @@ document.addEventListener("click", function (e) {
|
|||
|
||||
|
||||
if (element.dataset.toggleelement) {
|
||||
if (element.dataset.toggleelement.startsWith('#reply-'))
|
||||
close_inline_speed_emoji_modal();
|
||||
|
||||
const toggling = document.querySelector(element.dataset.toggleelement)
|
||||
const attr = element.dataset.toggleattr;
|
||||
|
||||
|
|
|
@ -85,6 +85,8 @@ function toggleEdit(id){
|
|||
actions.classList.toggle("d-none");
|
||||
autoExpand(box);
|
||||
markdown(box);
|
||||
|
||||
close_inline_speed_emoji_modal();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -12,4 +12,6 @@ function togglePostEdit(id){
|
|||
markdown(box);
|
||||
box=document.getElementById("post-edit-title");
|
||||
autoExpand(box);
|
||||
|
||||
close_inline_speed_emoji_modal();
|
||||
};
|
||||
|
|
|
@ -364,6 +364,11 @@ function curr_word_is_emoji()
|
|||
current_word.charAt(current_word.length-1) != ":";
|
||||
}
|
||||
|
||||
function close_inline_speed_emoji_modal() {
|
||||
selecting = false;
|
||||
speed_carot_modal.style.display = "none";
|
||||
}
|
||||
|
||||
function populate_speed_emoji_modal(results, textbox)
|
||||
{
|
||||
selecting = true;
|
||||
|
@ -407,8 +412,7 @@ function populate_speed_emoji_modal(results, textbox)
|
|||
if (current_word.includes("!")) name = `!${name}`
|
||||
|
||||
emoji_option.addEventListener('click', () => {
|
||||
selecting = false;
|
||||
speed_carot_modal.style.display = "none";
|
||||
close_inline_speed_emoji_modal()
|
||||
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `:${name}: `)
|
||||
textbox.focus()
|
||||
if (document.location.pathname != '/chat'){
|
||||
|
|
Loading…
Reference in New Issue