Fix variable shadowing
| @@ -9243,14 +9243,14 @@ jQuery(async function () { | |||
| 9243 | immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target); | 9243 | immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target); |
| 9244 | } | 9244 | } |
| 9245 | }); | 9245 | }); |
| 9246 | const chatElement = document.getElementById('chat'); | 9246 | const chatElementScroll = document.getElementById('chat'); |
| 9247 | chatElement.addEventListener('wheel', function () { | 9247 | chatElementScroll.addEventListener('wheel', function () { |
| 9248 | scrollLock = true; | 9248 | scrollLock = true; |
| 9249 | }, { passive: true }); | 9249 | }, { passive: true }); |
| 9250 | chatElement.addEventListener('touchstart', function () { | 9250 | chatElementScroll.addEventListener('touchstart', function () { |
| 9251 | scrollLock = true; | 9251 | scrollLock = true; |
| 9252 | }, { passive: true }); | 9252 | }, { passive: true }); |
| 9253 | chatElement.addEventListener('scroll', function () { | 9253 | chatElementScroll.addEventListener('scroll', function () { |
| 9254 | if (is_use_scroll_holder) { | 9254 | if (is_use_scroll_holder) { |
| 9255 | this.scrollTop = scroll_holder; | 9255 | this.scrollTop = scroll_holder; |
| 9256 | is_use_scroll_holder = false; | 9256 | is_use_scroll_holder = false; |
| @@ -9806,7 +9806,7 @@ jQuery(async function () { | |||
| 9806 | }); | 9806 | }); |
| 9807 | 9807 | ||
| 9808 | //confirms message deletion with the "ok" button | 9808 | //confirms message deletion with the "ok" button |
| 9809 | $('#dialogue_del_mes_ok').click(async function () { | 9809 | $('#dialogue_del_mes_ok').on('click', async function () { |
| 9810 | $('#dialogue_del_mes').css('display', 'none'); | 9810 | $('#dialogue_del_mes').css('display', 'none'); |
| 9811 | $('#send_form').css('display', css_send_form_display); | 9811 | $('#send_form').css('display', css_send_form_display); |
| 9812 | $('.del_checkbox').each(function () { | 9812 | $('.del_checkbox').each(function () { |
| @@ -9822,7 +9822,7 @@ jQuery(async function () { | |||
| 9822 | chat.length = this_del_mes; | 9822 | chat.length = this_del_mes; |
| 9823 | await saveChatConditional(); | 9823 | await saveChatConditional(); |
| 9824 | chatElement.scrollTop(chatElement[0].scrollHeight); | 9824 | chatElement.scrollTop(chatElement[0].scrollHeight); |
| 9825 | eventSource.emit(event_types.MESSAGE_DELETED, chat.length); | 9825 | await eventSource.emit(event_types.MESSAGE_DELETED, chat.length); |
| 9826 | $('#chat .mes').removeClass('last_mes'); | 9826 | $('#chat .mes').removeClass('last_mes'); |
| 9827 | $('#chat .mes').last().addClass('last_mes'); | 9827 | $('#chat .mes').last().addClass('last_mes'); |
| 9828 | } else { | 9828 | } else { |