CSS-Patterns-Workbench icon indicating copy to clipboard operation
CSS-Patterns-Workbench copied to clipboard

Undo (cmd+z) command conflicts with native Safari behavior

Open zahnster opened this issue 13 years ago • 0 comments

Native Safari behavior associates cmd+z (typically the undo shortcut) with opening the last closed tab. This conflicts with the undo command implemented in the app.

Steps to Reproduce:

  1. Open Safari, and navigate to CSS Patterns Workbench.
  2. Open another tab in that window, go to any URL, and close it.
  3. Do an action in the CSS Workbench, and then hit cmd + z

Expected Result: Workbench should undo, but event should not bubble to Safari to invoke native behavior there. Actual Result: Native behavior is called.

I would imagine something like preventDefault might work here.

Should note: if the window has never had any other tabs open, this won't be an issue. It needs the specific test case mentioned above.

zahnster avatar May 16 '12 17:05 zahnster