fix(editor): return the focus without a scroll; drop an inert tap
Final review M-4 and M-6: the line's « Défaire » focuses the drawing through focusDrawing (preventScroll), and a mode's end focuses its entry with preventScroll, so neither scrolls the page (A14). M-8: the empty tap kept after the removed click was as inert; gone. Tests removed: in « a mouse tap deselects at the pointer-up », the second pointerDown/pointerUp on the empty drawing and its repeated isDeselected assertion (the first tap's assertion covers it).
This commit is contained in:
1 parent
10a8767527
commit
a6685a04e0
3 files changed
+11
-12
No files matched your search
@@ -1553,14 +1553,11 @@ describe('a tap on the drawing (D6b)', () => {
|
||||
})
|
||||
|
||||
// Final review M-8: since T2 a `click` on the canvas does nothing, so the click this test
|
||||
// fired on a marker could not change the outcome; it is gone, the taps are the test.
|
||||
it('a mouse tap deselects at the pointer-up; another tap on the empty drawing keeps it so', async () => {
|
||||
// fired on a marker (and the empty tap before it) could not change the outcome: gone.
|
||||
it('a mouse tap deselects at the pointer-up', async () => {
|
||||
await selected({ text: insert(text(), named('anno-b', 90, 90, 3)) })
|
||||
tap(rect(), { upOn: rect() })
|
||||
expect(isDeselected()).toBe(true)
|
||||
fireEvent.pointerDown(rect(), { ...init(), clientX: 10, clientY: 10 })
|
||||
fireEvent.pointerUp(rect(), { ...init(), clientX: 10, clientY: 10 })
|
||||
expect(isDeselected()).toBe(true)
|
||||
})
|
||||
|
||||
it('a press on a polygon vertex handle outside its fill deselects (documented)', async () => {
|
||||
|
||||
Reference in new issue
Block a user