Ticket #11997 (closed feature: plugin)
Feature enhancement: Add hasModifiers() to jQuery.Event
|Reported by:||michael@…||Owned by:|
I'd propose a method for events which would be true if any of shiftKey, metaKey, etc are true.
This is an important use case for PJAX/HTML5-history apps following the practice of graceful degradation. You create a normal link and hijack it to open the page via Ajax using event.preventDefault(). However, this behaviour breaks user expectations when a modifier is in effect - users will expect the link to act as a normal link and open in a new tab/window or open the popup menu. So a convenience method would be useful in many modern web apps.