Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Event.button returns a value of "-1" when the button is selected by using accessKey input in Internet Explorer 11


View products that this article applies to.

Symptoms

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.

↑ Back to the top


Resolution

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).

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

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>

↑ Back to the top


References

See the terminology that Microsoft uses to describe software updates.

↑ Back to the top


Keywords: kb, kbsurveynew, kbexpertiseinter, kbqfe, kbfix

↑ Back to the top

Article Info
Article ID : 3115913
Revision : 2
Created on : 9/29/2020
Published on : 9/29/2020
Exists online : False
Views : 297