Skip to content
Snippets Groups Projects
Commit 5b70f496 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Minor UI improvements

parent a04ad157
No related branches found
No related tags found
No related merge requests found
...@@ -8,12 +8,10 @@ const keyListener = (event) => { ...@@ -8,12 +8,10 @@ const keyListener = (event) => {
const changeListener = (event) => { const changeListener = (event) => {
requestAnimationFrame(() => { requestAnimationFrame(() => {
const element = event.target; const element = event.target;
const selectionStart = element.selectionStart;
const selectionEnd = element.selectionEnd; if (element.innerText === "\n") {
const text = element.innerText; element.innerText = "";
element.innerText = (text === "\n") ? "" : text; }
element.selectionStart = selectionStart;
element.selectionEnd = selectionEnd;
}) })
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment