SqlOtter

Browse and edit table data / Browse and find

Escape handling in Table Content

Escape goes to the focused control first. The grid handles pending rows, editing and selection states before it can exit fullscreen. Repeated presses or holding the key do not mean “cancel everything”.

Where to open it

In Table Content, identify whether focus is in an inline input, the grid, an enhanced cell editor or a confirmation dialog before pressing Esc (Escape).

Keys and controls

Escape follows the focused control and its current state.

Keys and controls
ActionWindows / LinuxmacOSFocus and effect
Handle the active layerEsc / EscapeEsc / EscapeFocus and state determine the action; see the grid priority table.
Request enhanced-editor exitEsc again within 2 seconds of promptEsc again within 2 seconds of promptSearch, media and text selection are handled first. Unsaved changes still require Save / Discard / Cancel.

Before you start

Distinguish existing records, unsaved new rows and changes already accepted or written. Escape handles the current interface state; it does not undo successful database updates.

Follow these steps

  1. During inline editing, Esc follows the current edit cancellation/close path. Once that unaccepted input ends, another press handles remaining grid states. A child editor or dialog processes its own key first.
  2. When Esc reaches the grid and selected rows include pending new rows, or the current row is pending, Confirm Cancel takes priority. No is the default. Choosing No or closing the confirmation keeps the new rows and consumes this keypress.
  3. Without pending rows to cancel, use the priority table below to find the first applicable state. One press handles that layer; it does not dismiss a tip, clear selection and exit fullscreen together.
  4. Re-evaluate the state on each further press, skipping absent layers. Fullscreen exits only after the grid has no remaining Escape state. Normal Table Content does not close its table tab or application through this chain.

Example: successive presses in fullscreen

Assume an existing row, an inline edit, a selection and column statistics are active, with no floating tip or pending new rows.

  1. Esc ends the current unaccepted inline edit.
  2. With focus back in the grid, Esc clears the remaining selection.
  3. If statistics is still active, Esc deactivates it.
  4. If a current cell position remains, Esc clears it.
  5. Only when none of these states remains does Esc exit table fullscreen.
  • This is a conditional example, not a required five-press sequence. Absent states are skipped, and a child control or pending-row confirmation changes the path.

Pending new rows: confirmation comes first

The grid checks local pending rows before its generic Escape actions.

  1. Selected pending rows take precedence. If none is selected, the current row is used only if it is pending.
  2. A mixed selection cancels only unsaved new rows. Yes removes those local drafts; it does not delete persisted rows.
  3. No (the default) or closing the confirmation keeps the drafts and consumes the keypress. The same rows can prompt again.
  4. Rows already saved are no longer pending and are outside this Escape cancellation path.
  • While a child inline editor owns the event, it can handle editing first. Once the event reaches the grid, pending-row confirmation has priority over generic edit/selection handling.

Inside the enhanced Edit Field dialog

The separate text / JSON / BLOB editor has its own Escape lifecycle before the underlying grid.

  1. A visible find/replace panel closes first. Remaining search text can be cleared when focus is in the search context; an active playing video is stopped before exit.
  2. In the text editor, active completion/search overlays, selected text and remaining search highlights are handled before the exit gesture. These actions keep the dialog open.
  3. With those states cleared, the first Esc shows “Press ESC again to exit editor”. Press Esc again within 2 seconds to request close; after the window expires, the first-press prompt starts again. Non-text dialog surfaces use their own two-press exit guard.
  4. Read-only or unchanged content can close. Unsaved changes open Save / Discard / Cancel, with Cancel as default: Save accepts the dialog content, Discard abandons its draft, Cancel stays. Accepting content can update an existing record.
  5. A nested fullscreen content preview handles Esc by closing that preview. Return to the editor or grid and re-evaluate its state before pressing again.
  • A lightweight floating field tip is different: its own Esc rejects/closes that tip. Closing any child dialog does not simultaneously exit the underlying table fullscreen.

Priority when the grid receives Escape

Read top to bottom; the first applicable branch consumes the keypress. This table describes grid events. Child editors and confirmations process their own keys first.

Priority when the grid receives Escape
State / priorityEffect of this EscapeOn a further press
1 · Selected / current pending new rowsAsk whether to cancel the pending rows. Yes removes them locally; No (default) or closing the prompt keeps them.After No, the same target may prompt again. After Yes, evaluate remaining states.
2 · Visible floating field tipClose the field tip.Handle editing, selection or another remaining state.
3 · Inline editing still activeCancel / close the current unaccepted cell edit.Evaluate remaining states; previously submitted values are not rolled back.
4 · Selected cells / rowsClear the grid selection.The current cell may remain; column statistics is checked next.
5 · Column statistics activeDeactivate column statistics.Check the current cell position next.
6 · Current cell position remainsClear the current row/column and its position indicator.With no other state, a further press can exit table fullscreen.
7 · None of the aboveExit table fullscreen and restore its page. Normal mode has no corresponding table-close action.Follow the rules of the newly focused control.
  • Column statistics is cleared before the current cell position. Selection and current position are distinct, so clearing selection may leave another Escape step.

What to expect

Predict whether the next Escape affects an edit, pending new rows, selection, column statistics, the current cell or fullscreen. Confirmations still require an explicit choice.

Scope and limits

  • Existing-row inline editing, the separate enhanced Edit Field dialog and local pending new rows follow different paths. There is no fixed “first cancels editing, second exits” rule.
  • The grid branches have no common guard against key auto-repeat. Holding Esc may produce repeated events and advance through several layers. Timing, event counts and focus changes depend on the platform and control. Press briefly, observe and repeat deliberately.
  • Confirmations and child dialogs take over later Escape events. No / Cancel does not authorize discarding. A pending row may trigger the same confirmation again; holding the key is not guaranteed to exit.
  • The fullscreen button accepts current inline input first and may write an existing-row edit. Esc does not roll back accepted edits, saved new rows or executed SQL.

If something goes wrong

  • If Escape seems inactive, check for internal search, text selection, an exit prompt or unsaved changes in the editor, then return focus to the grid.
  • If records remain after cancelling new rows, check whether they were already saved. Cancelling pending rows with Esc does not DELETE existing database records.