FIX: prevents showing discard modal on re-edit (#26639)

This commit will now change two behaviors:

- If composer is already opened on a specific post and we click on edit again for the same post, we will do nothing and not show the discard draft modal
- if composer is shrinked and we click on edit for the same currently edited post, we will just open the composer and not show the discard draft modal
This commit is contained in:
Joffrey JAFFEUX
2024-04-16 10:34:32 +02:00
committed by GitHub
parent 7a083daf27
commit bbe62d88d2
5 changed files with 104 additions and 0 deletions

View File

@ -34,6 +34,11 @@ module PageObjects
self
end
def minimize
find("#{COMPOSER_ID} .toggle-minimize").click
self
end
def append_content(content)
current_content = composer_input.value
composer_input.set(current_content + content)