When using the HTML5 contenteditable
attribute, I've noticed that the spacebar does not work in the button
element, but it works perfectly fine in the div
element. Does anyone have a solution to get it working properly?
You can see the issue here: https://jsfiddle.net/Issact/f6jc5th4/
HTML:
<div contenteditable="true">
This is editable and the spacebar works fine in the "Div" for white-space
</div>
<button contenteditable="true">
This is editable but the spacebar does not work in the "button" for white-space
</button>
CSS:
div {
background-color:black;
padding:20px;
color:#fff;
}
button {
background-color:green;
padding:20px;
color:#fff;
}