Event.button returns a value of "-1" when the button is selected by using accessKey input in Internet Explorer 11
When you use Internet Explorer 11 and an input button that defines the property accessKey, event.button returns a value of "-1" (meaning "no button pressed"). The expected result should be a value of "0" according to the button property.
To fix this issue, install the most recent cumulative security update for Internet Explorer. To do this, go to Microsoft Update. Additionally, see the technical information about the most recent cumulative security update for Internet Explorer.
Note This update was first included in the November 2015 security update for Internet Explorer (MS15-112).
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Here's the HTML code of a webpage that demonstrates the issue:
<!DOCTYPE html><html><body> <input accesskey="Y" value="Press Alt + Y" type="button" onclick="alert('event.button was '+ event.button);"></input></body></html>
See the terminology that Microsoft uses to describe software updates.
Article ID: 3115913 - Last Review: 11/19/2015 09:12:00 - Revision: 1.0
Internet Explorer 11
- kbfix kbqfe kbexpertiseinter kbsurveynew KB3115913