| 2288 | await callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true }); | 2288 | await callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true }); |
| 2289 | }); | 2289 | }); |
| 2290 | | 2290 | |
| 2291 | $(document).on('click', 'body .mes .mes_text', function () { | 2291 | $(document).on('click', 'body .mes .mes_text, body .mes .mes_reasoning', function (event) { |
| 2292 | if (!power_user.click_to_edit) return; | 2292 | if (!power_user.click_to_edit) return; |
| 2293 | if (window.getSelection().toString()) return; | 2293 | if (window.getSelection().toString()) return; |
| 2294 | if ($('.edit_textarea').length) return; | 2294 | if ($('.edit_textarea').length) return; |
| 2295 | $(this).closest('.mes').find('.mes_edit').trigger('click'); | 2295 | $(this).closest('.mes').find('.mes_edit').trigger('click'); |
| | 2296 | if ($(event.target).closest('.mes_reasoning').length) { |
| | 2297 | $('.reasoning_edit_textarea').trigger('focus'); |
| | 2298 | } |
| 2296 | }); | 2299 | }); |
| 2297 | | 2300 | |
| 2298 | $(document).on('click', '.open_media_overrides', openExternalMediaOverridesDialog); | 2301 | $(document).on('click', '.open_media_overrides', openExternalMediaOverridesDialog); |