Don't trigger action if its element is disabled

Fixes #1936