[HTML5] document.activeElement

时间:2020-06-08 19:37:36   收藏:0   阅读:46

When you doing Modal UI component, one common aria issue you need to deal with is "Refoucs the opener element when Modal closed".

 

To do this, you need to use 

document.activeElement

 

You can save in a variable, when modal get closed, call ‘.focus()‘ method on it.

原文:https://www.cnblogs.com/Answer1215/p/13067695.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!