When a trigger can't execute a command, it never prevents default
Open, LowPublic

Description

Commands have an isExectuable method which say if they can run in the current context (e.g. table commands only run on table selections, clear annotation only runs on annotated selections, list ident only on lists).

If isExecutable is false, we don't prevent default so inputs like 'TAB' return to their default behaviour outside of a list item.

This can cause problems if the default command is undesirable, e.g. on macs, command+m closes the window, but we map it to clear annotation command, so when run on a non-annotated selection it falls back to closing the window.

In this particular example we should probably remove command+m, but in general we should allow commands to distinguish between isExecutable, and shouldTriggerPreventDefault.

Esanders updated the task description. (Show Details)
Esanders raised the priority of this task from to Needs Triage.
Esanders added a subscriber: Esanders.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 23 2015, 12:36 PM

Hi @Esanders. Please associate at least one project with this task, otherwise nobody can find this task when searching in the corresponding project(s). Thanks.

Hi @Esanders. Please associate at least one project with this task, otherwise nobody can find this task when searching in the corresponding project(s). Thanks.

Esanders set Security to None.