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:
Régis Hanol
2024-04-04 18:43:25 +02:00
committed by GitHub
parent eaeefb56fc
commit 377d2ca3ad
3 changed files with 44 additions and 1 deletions

View File

@ -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