Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-PALETTE-256

The slash menu stays next to the caret inside the viewport

When the slash menu opens, the extension SHALL place it under the caret line inside the viewport, uncovered by the floating toolbar, with a maximum height of 320 px and an edge of 8 px, above the caret when there is no room below, and keep it next to the caret while the writer types, scrolls or resizes.

Part of StRS-MDOKFSTUDIO-PALETTE-015, outside the paths drawn on its map.

Scenarios 6

The situations the tests check; open one to read it.

nominalRoom below
Givena caret with room below
Whenthe menu opens
Thenit sits under the caret line, inside the viewport and clear of the floating toolbar, no taller than 320 px
boundaryNo room below
Givena caret near the bottom of the viewport
Whenthe menu opens
Thenit sits above the caret line
nominalThe left edge stays while the query grows
Givenan open menu
Whenthe writer types more letters
Thenthe left edge of the menu, relative to the text box, does not move
boundaryPane edge
Givena caret close to the right edge of a pane
Whenthe menu opens
Thenthe menu is pulled left to stay inside the viewport, at least 8 px from the viewport edge
nominalThe menu follows the caret
GivenWhenOutcome
an open menuthe page scrolls or the window resizesthe menu moves with the caret
an open menu with a long listthe list inside the menu scrollsthe menu does not move
boundaryThe caret scrolls out of the viewport
GivenWhenOutcome
the caret scrolled above or below the viewportthe page scrollsthe menu closes
the caret still in the viewportthe page scrollsthe menu stays open

Implemented in 1

Tested by 1