fix: disable editing after collapse/expand through block controls

pull/4822/head
Tienson Qin 2022-04-05 11:52:24 +08:00
parent 4bf2af59ef
commit d27ec18a65
2 changed files with 4 additions and 3 deletions

View File

@ -77,9 +77,6 @@ test('disappeared children #4814', async ({ page }) => {
await enterNextBlock(page)
}
// edit the first block
await editFirstBlock(page)
// collapse
await page.click('.block-control >> nth=0')
@ -87,6 +84,9 @@ test('disappeared children #4814', async ({ page }) => {
await page.click('.block-control >> nth=0')
await page.waitForSelector('.ls-block >> nth=6') // 7 blocks
// Ensures there's no active editor
await expect(page.locator('.editor-inner')).toHaveCount(0, {timeout: 500})
})
// FIXME: ClipboardItem is not defined when running with this test

View File

@ -1415,6 +1415,7 @@
{:id (str "control-" uuid)
:on-click (fn [event]
(util/stop event)
(state/clear-edit!)
(if ref?
(state/toggle-collapsed-block! uuid)
(if collapsed?