How to retain focus on an editable html after deleting an element.
Posted
by Lukasz
on Stack Overflow
See other posts from Stack Overflow
or by Lukasz
Published on 2010-05-29T07:18:58Z
Indexed on
2010/05/29
7:22 UTC
Read the original article
Hit count: 226
JavaScript
Hello,
I have a website with design mode on (aka. content editable = true) with some basic text on it. To that site I hooked up a shortcut so that at any point in the text I can insert an input box that serves me as an autocomplete. For that input however I want it to disappear right after I hit ENTER so that I can continue typing. It is an easy task to just make the input box disappear but I always loose focus from my document. I would greatly appreciate any suggestions on how to make this work?
© Stack Overflow or respective owner