diff --git a/main.js b/main.js index 1f548ad..e3f91d1 100644 --- a/main.js +++ b/main.js @@ -160,12 +160,12 @@ function setCurrentInput() { function clear() { currentInput.value = ""; - // TODO: set current input as focused + currentInput.focus(); } function keyPress(c) { currentInput.value += c; - // TODO: set current input as focused + currentInput.focus(); } document.querySelector("#expr").addEventListener("focus", setCurrentInput); @@ -194,3 +194,6 @@ document.querySelector("#pow").addEventListener("click", () => keyPress("^")); document.querySelector("#clear").addEventListener("click", clear); document.querySelector("#enter").addEventListener("click", calculate); + +// FIXME buttons don't work if you try to insert in the middle of the text +// TODO backspace is probably going to be tricky