forked from rDrama/rDrama
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) {
|
||||||
|
if (element.dataset.toggleelement.startsWith('#reply-'))
|
||||||
|
close_inline_speed_emoji_modal();
|
||||||
|
|
||||||
const toggling = document.querySelector(element.dataset.toggleelement)
|
const toggling = document.querySelector(element.dataset.toggleelement)
|
||||||
const attr = element.dataset.toggleattr;
|
const attr = element.dataset.toggleattr;
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,8 @@ function toggleEdit(id){
|
||||||
actions.classList.toggle("d-none");
|
actions.classList.toggle("d-none");
|
||||||
autoExpand(box);
|
autoExpand(box);
|
||||||
markdown(box);
|
markdown(box);
|
||||||
|
|
||||||
|
close_inline_speed_emoji_modal();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,6 @@ function togglePostEdit(id){
|
||||||
markdown(box);
|
markdown(box);
|
||||||
box=document.getElementById("post-edit-title");
|
box=document.getElementById("post-edit-title");
|
||||||
autoExpand(box);
|
autoExpand(box);
|
||||||
|
|
||||||
|
close_inline_speed_emoji_modal();
|
||||||
};
|
};
|
||||||
|
|
|
@ -364,6 +364,11 @@ function curr_word_is_emoji()
|
||||||
current_word.charAt(current_word.length-1) != ":";
|
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)
|
function populate_speed_emoji_modal(results, textbox)
|
||||||
{
|
{
|
||||||
selecting = true;
|
selecting = true;
|
||||||
|
@ -407,8 +412,7 @@ function populate_speed_emoji_modal(results, textbox)
|
||||||
if (current_word.includes("!")) name = `!${name}`
|
if (current_word.includes("!")) name = `!${name}`
|
||||||
|
|
||||||
emoji_option.addEventListener('click', () => {
|
emoji_option.addEventListener('click', () => {
|
||||||
selecting = false;
|
close_inline_speed_emoji_modal()
|
||||||
speed_carot_modal.style.display = "none";
|
|
||||||
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `:${name}: `)
|
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `:${name}: `)
|
||||||
textbox.focus()
|
textbox.focus()
|
||||||
if (document.location.pathname != '/chat'){
|
if (document.location.pathname != '/chat'){
|
||||||
|
|
Loading…
Reference in New Issue