Sometime when some component is offscreen, but still get focus when we tab though the page.

This can cause users' confusion.

One easy to to find out the offscreen component is typing in your console,

document.activeElement

It will shows your the current focus element.

Then what you need to do is add CSS so that it won't get focus anymore.

  display: none;
visibility: hidden;

When it comes into screen, set CSS:

  display: block;
visibility: visibile;

最新文章

  1. ASP.NET中常用的优化性能的方法
  2. Hadoop学习之旅二:HDFS
  3. Android系统拍照源码
  4. web前端教程之javascript创建对象的方法
  5. 工作中常用的Linux命令:crontab命令
  6. bzoj 1064
  7. main函数中argc和argv含义
  8. javascript-XMLHttpRequest
  9. ECshop中defined('IN_ECS')的实现原理
  10. 为什么你总是学不好Linux技术?这是我的答案。
  11. Java——设计模式(单例模式)
  12. 01-语言入门-01-A+B Problem
  13. 经历:easyui的datagrid没有数据滚动条的显示
  14. erlang如何有效地监视大量的并发连接
  15. Springmvc+Myabtis+Ajax实现异步分页emp+dept(全部查询及模糊查询)
  16. java 8 Lambda表达式(翻译自Stackoverflow)
  17. 从壹开始前后端分离 [ Vue2.0+.NET Core2.1] 二十四║ Vuex + JWT 实现授权验证登录
  18. C# 匿名对象(匿名类型)、var、动态类型 dynamic——实用之:过滤类属性、字段实用dynamic
  19. 3.The significance of Books 书本的意义
  20. Package gtk+-3.0 was not found in the pkg-config search path

热门文章

  1. JavaScript扩展运算符(...)
  2. .net core发布到IIS后502.5错误
  3. NOIP2013 D2T1 积木大赛
  4. Super超级ERP系统---(2)基础信息管理
  5. P1284 三角形牧场
  6. 用户 'NT Service\MSSQLServerOLAPService' 登录失败
  7. LINUX的signal
  8. (转)RabbitMQ学习之主题topic(java)
  9. java类型和mysql类型的转换
  10. print输出带颜色的方法详解