Commit 340e55a
authored
fix(superdoc): hoist closeOnEscape to request top level (SD-2870) (#3045)
The find/replace composable opened its surface with `floating: {
closeOnEscape: true, ... }`. The surface manager only reads
`request.closeOnEscape` (surface-manager.js:315). The nested
`floating.closeOnEscape` was preserved on the request but never
consulted, so the explicit intent was a silent no-op.
The escape-closes-surface behavior happened to work because the
top-level default is true, but a user override on `moduleConfig.floating
.closeOnEscape` would silently win over the find/replace request.
Move the field to its correct top-level position in all three
open() call sites. Tighten the existing unit test to assert the
top-level shape (the previous assertion verified the call shape but
not the runtime path). Add a one-line clarification to the typedef
so future contributors do not nest the field under `floating`.
Found while probing checkJs against use-find-replace.js for SD-2863.1 parent 2473353 commit 340e55a
3 files changed
Lines changed: 13 additions & 6 deletions
File tree
- packages/superdoc/src
- composables
- core/types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
| 545 | + | |
| 546 | + | |
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| |||
579 | 581 | | |
580 | 582 | | |
581 | 583 | | |
582 | | - | |
| 584 | + | |
| 585 | + | |
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
0 commit comments