Steps to reproduce
Found a nasty little bug in Edge that affects standard Enter key behavior for <button> elements: If you move focus to a <button> instance after having been previously focused in a contenteditable DIV, pressing Enter will direct focus back to the contenteditable DIV and add a line break.
Interestingly this bug is unique to the <button> element. Buttons created via <input type="button"> don’t exhibit this bug. This bug is also unique to Edge and is breaking standard keyboard behavior for buttons. IE 11, Chrome, Safari and Firefox don’t have this issue.
When a <button> has focus, pressing Enter should trigger the click event on the <button> and focus should remain on the button.
Steps to reproduce:
- Open https://codepen.io/toddlr/pen/EXXMZz in Edge
- Move focus into the contenteditable DIV
- Press Shift + Tab until you move focus to the button labeled “Button 1”
- Press the Enter
- Observe how onkeydown focus was forwarded back to the contenteditable DIV and a line break was added to the contenteditable DIV
Comments and activity
- Microsoft Edge Team
Changed Assigned To to “James M.”
Changed Assigned To to “Bogdan B.”
Changed Assigned To to “Grisha L.”
Changed Status to “Fixed”
Thank you for providing this information about the issue. We have confirmed the problem, and we are working on a solution for a future build of Edge. We are presently tracking this issue as a duplicate of an existing internal bug report. We look forward to additional feedback you may have on how we can improve Microsoft Edge.
The MS Edge Team