On subscribing to store, variables in component might change leading to DOM updates loosing the focus on present active element
(订阅存储时,组件中的变量可能会发生变化,从而导致DOM更新,从而失去了对当前活动元素的关注)
I set the tabindex attributes on elements that need to be focused, but on clicking enter on few elements(simulates mouse click), my store gets updated, leading to DOM update, but my element is still there but as a fresh copy, so the reference is lost and also the focus gets shifted to body.
(我在需要重点关注的元素上设置了tabindex属性,但是在单击几个元素上的enter(模拟鼠标单击)后,我的商店就会更新,导致DOM更新,但是我的元素仍然在那里,但是作为一个新副本,所以失去参考,焦点也转移到身体上。)
Is there any way I can retain focus on the same element if it exists after DOM updates from store?(从商店更新DOM后,如果存在相同的元素,我有什么办法可以保持关注?)
ask by nithin guptha translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…