Decouple "click to edit" from document mode

This commit is contained in:
Cohee
2025-05-06 22:02:20 +03:00
parent 0f1bb766f6
commit 5e31a21d8d
3 changed files with 20 additions and 4 deletions

View File

@@ -1576,7 +1576,8 @@ jQuery(function () {
await callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true });
});
$(document).on('click', 'body.documentstyle .mes .mes_text', function () {
$(document).on('click', 'body .mes .mes_text', function () {
if (!power_user.click_to_edit) return;
if (window.getSelection().toString()) return;
if ($('.edit_textarea').length) return;
$(this).closest('.mes').find('.mes_edit').trigger('click');