mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: keep details open in preview (#26518)
when morphing is enabled, details elements in the preview will be kept open
This commit is contained in:
@ -219,6 +219,7 @@ module PageObjects
|
||||
const index = composer.value.indexOf(text);
|
||||
const position = index + text.length;
|
||||
|
||||
composer.focus();
|
||||
composer.setSelectionRange(position, position);
|
||||
JS
|
||||
end
|
||||
@ -226,6 +227,7 @@ module PageObjects
|
||||
def select_all
|
||||
execute_script(<<~JS, text)
|
||||
const composer = document.querySelector("#{COMPOSER_ID} .d-editor-input");
|
||||
composer.focus();
|
||||
composer.setSelectionRange(0, composer.value.length);
|
||||
JS
|
||||
end
|
||||
|
Reference in New Issue
Block a user