Closed ghost closed 9 years ago
Not sure this question is related to dom-layer
. Just use vanilla JS to programmatically trigger your event on you DOM element, the event manager will forwared it up to the virtual node events
available event handler. Otherwise I didn't understand what you want to do with document.activeElement
If you check out this function in REACT getActiveElement().
Quote from one use case: "If any selection information was potentially lost, restore it. This is useful when performing operations that could remove dom nodes and place them back in, resulting in focus being lost. " Maybe you can get ideas from this source? https://github.com/jhudson8/react-events/blob/master/react-events.js
You are talking about the focus lost issue ?
yes, focus and state lost issues
Sates issue shouldn't occurs if you are using the key
attribute correclty (like in React). And when inputs are moved around they will lost their focus but I didn't managed it right now.
Let say you have created a virtual DOM tree, and want to trigger a event on a particular node in the tree.
How you do it?
Example "change" should be "triggered" each time you e.g. click / change it. And I can't find any use of document.activeElement, so the focus will be lost if you have 3 select and jumping from one to one?