Commit 8f4522e3 authored by Camil Staps's avatar Camil Staps 🍃

Yet another stab at #211 (weird edge bug with deleting all text from input field)

parent e83871d4
......@@ -1013,7 +1013,8 @@ if (make_content_editable) {
formsubmit();
return false;
} else if (e.keyCode == 46 || e.keyCode == 8) { /* delete / backspace */
if (window.getSelection().toString() == this.innerText) {
/* Weird Edge behaviour causes the input field to disappear when all text is deleted */
if (window.getSelection().toString().length >= this.innerText.length) {
this.innerText = '';
this.oninput();
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment