I need to detect when the popup key for selection is out on the textarea:
This one in the picture to be clear.
My current finding is that registering events as i did in the fiddle down does not help me finding something unique when the popup opens.
Why i need to detect the popup?
Because i have some event registered on the keydown that call a e.preventDefault()
and e.stopImmediatePropagation()
. On firefox for example this kind of event handling stop the popup from working completely and so i need to disable my even handler when the popup is opened.
var txt = document.getElementById('test');
txt.addEventListener('compositionupdate', console.log);
txt.addEventListener('compositionstart', console.log);
txt.addEventListener('compositionend', console.log);
txt.addEventListener('input', console.log);
txt.addEventListener('keyup', console.log);
txt.addEventListener('keydown', console.log);
txt.addEventListener('keypress', console.log);
<textarea id="test" ></textarea>