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

Minor UI improvements

parent a0145530
No related branches found
No related tags found
No related merge requests found
...@@ -7,8 +7,13 @@ const keyListener = (event) => { ...@@ -7,8 +7,13 @@ const keyListener = (event) => {
const changeListener = (event) => { const changeListener = (event) => {
requestAnimationFrame(() => { requestAnimationFrame(() => {
const text = event.target.innerText; const element = event.target;
event.target.innerText = (text === "\n") ? "" : text; const selectionStart = element.selectionStart;
const selectionEnd = element.selectionEnd;
const text = 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