Behaviour SwRS-MDOKFSTUDIO-PALETTE-031
Palette popovers open in the frame, one at a time, and Escape or typing closes them
When the writer opens, leaves or dismisses a popover of the palette, the extension SHALL open it inside the editor frame under its button (under the caret for the alert list), keep at most one open, and close it on Escape or on typing or pressing in the text box, giving the focus back to the text box and keeping the editor open.
Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-PALETTE-005, in the state “The palette is in view above the text box”.
Part of StRS-MDOKFSTUDIO-PALETTE-007, outside the paths drawn on its map.
Part of StRS-MDOKFSTUDIO-TABLE-016, outside the paths drawn on its map.
Scenarios 5
The situations the tests check; open one to read it.
nominalEvery popover opens inside the frame
| Pane | Popovers opened | Outcome |
|---|---|---|
| 900 px | heading list, table grid, emoji picker, alert list, colour picker | each lies inside the editor frame |
| 360 px | grid, emoji and heading popovers | each stays inside the pane |
| 460 px (emoji picker of the cell formatting group) | emoji picker | its left edge is not left of the viewport and its right edge is not beyond it |
| 900 px (emoji picker of the cell formatting group) | emoji picker | the picker is inside the viewport |
nominalOne popover at a time and a toggling button
the writer presses the Emoji button again
the picker closes and no new popover opens
A button whose action has a popover has aria-haspopup menu and an aria-expanded that is true exactly while its popover is open; at most one element with the class sphinx-preview-edit-palette-menu exists, and the button of a closed popover has aria-expanded false.
nominalEscape or typing closes only the popover
| Popover | Escape | Typing or mouse press in the text box |
|---|---|---|
| Heading list | the list closes and the editor stays open | the popover closes; the editor stays usable |
| Emoji picker (filter or an emoji) | the picker closes, the text box has the focus and the editor is still open | a mouse press closes the picker and the editor stays usable |
| Size grid | the grid closes and the editor stays open | typing a character closes the grid and the editor stays open |
| Colour picker (colour code field) | the picker closes, the focus returns to the text box and the editor stays open | the popover closes |
| Link panel (also Cancel) | the panel closes, the text box has the focus with its selection restored, no change is made and the editor stays open | the panel closes without restoring the old selection: a later press of a stale Insert cannot corrupt the text, and a mouse press keeps the selection chosen by the press |
| Figure form (also Cancel) | the form closes, the text box has the focus and the editor stays open (Cancel writes nothing) | typing closes the form; a mouse press closes the form |
| Emoji picker of the cell formatting group | the picker closes and the cell editor stays open | not stated |
boundaryEscape with no popover, second Escape, insertion from the popover
| Input | Outcome |
|---|---|
| Escape with no popover open | the editor is cancelled as usual (a cell is cancelled, see SwRS-MDOKFSTUDIO-TABLE-025) |
| Escape a second time after the popover closed (colour picker, emoji picker) | the editor is cancelled |
| first Escape with a popover open | the popover closes and no cancel is posted |
| emoji clicked with Shift held, emoji picker open | the emoji is inserted and the picker stays open (an insertion made by the popover itself does not close it) |
| emoji chosen without Shift | the emoji is inserted and the focus returns to the text box |
nominalA popover closed while it holds the focus gives the focus back
| Closing | Outcome |
|---|---|
| popover closed while the emoji filter has the focus | the text box is the active element and the leave callback is not called |
| an emoji chosen while the filter has the focus | the emoji is inserted and the focus returns to the text box |