fix(editor): no strip scroll margin on a dialog's controls

This commit is contained in:
bchanot committed 2026-11-19 15:18:05 +01:00
1 parent 303e153777
commit b0344a4af6
2 files changed
+12 -12

No files matched your search

+4 -4
View File
@@ -18,9 +18,9 @@ body,
page when the focus went to the sticky bar or strip themselves (probed, U2 Task 14), and a page when the focus went to the sticky bar or strip themselves (probed, U2 Task 14), and a
page-wide rule outlived a hidden strip. Every focusable of the place gets it (rows, page-wide rule outlived a hidden strip. Every focusable of the place gets it (rows,
handles, the canvas box, tools, view chips, the aside's controls: a Tab walk probed them handles, the canvas box, tools, view chips, the aside's controls: a Tab walk probed them
under the strip, rev 4 I-3), except the strip's own commands: their focus must not under the strip, rev 4 I-3), except the strip's own commands, whose focus must not
scroll. The place is `hidden` while another section shows, and the strip is sticky from scroll, and a dialog's controls, which scroll inside the dialog. The place is `hidden`
1 024 px only. */ while another section shows, and the strip is sticky from 1 024 px only. */
@media (min-width: 1024px) { @media (min-width: 1024px) {
[data-place='annotations.drawing']:not([hidden]) [data-place='annotations.drawing']:not([hidden])
:is( :is(
@@ -32,7 +32,7 @@ body,
[tabindex], [tabindex],
[data-focus-key], [data-focus-key],
[data-focus-target] [data-focus-target]
):not([data-testid='edit-strip'] *) { ):not([data-testid='edit-strip'] *, dialog *) {
scroll-margin-top: calc( scroll-margin-top: calc(
var(--shell-top-bar-height) + var(--edit-strip-height) + 1.5rem var(--shell-top-bar-height) + var(--edit-strip-height) + 1.5rem
); );
+8 -8
View File
@@ -233,14 +233,14 @@ the safe-area inset) and the strip's (`--edit-strip-height`) are CSS variables
of `styles/index.css`, which also feed a `scroll-margin-top` on every focusable of `styles/index.css`, which also feed a `scroll-margin-top` on every focusable
of the drawing place (links, buttons, fields, `tabindex` elements, rows through of the drawing place (links, buttons, fields, `tabindex` elements, rows through
`data-focus-key`, handles through `data-focus-target`, the canvas box) except `data-focus-key`, handles through `data-focus-target`, the canvas box) except
the strip's own commands, from 1 024 px and only while the place is not the strip's own commands and a dialog's controls, from 1 024 px and only while
`hidden`, so a focus or a `scrollIntoView` never lands under either. It is a the place is not `hidden`, so a focus or a `scrollIntoView` never lands under
margin, not a page `scroll-padding`: the padding made the page jump when the either. It is a margin, not a page `scroll-padding`: the padding made the page
focus went to the sticky bar or strip themselves, which is also why the strip's jump when the focus went to the sticky bar or strip themselves, which is also
commands carry none. A vertex chosen from the keyboard (Delete, Backspace, why the strip's commands carry none. A vertex chosen from the keyboard (Delete,
Insert, « + ») takes the focus with a scroll, so the margin applies; one chosen Backspace, Insert, « + ») takes the focus with a scroll, so the margin applies;
by a pointer or a finger takes it without a scroll. Below 1 024 px the strip is one chosen by a pointer or a finger takes it without a scroll. Below 1 024 px
not sticky. the strip is not sticky.
A creation (U2 Task 7, A2, A4, A12) is drawn by the overlay too, never by the A creation (U2 Task 7, A2, A4, A12) is drawn by the overlay too, never by the
core, since the new shape is not in the document until « Créer »: core, since the new shape is not in the document until « Créer »: