Comments (6)
控件是否加hover、active、press、focus这些state由控件自己决定,仅样式上的变化的话,通过CSS处理,不通过鼠标事件管这事。
一定要有:hover、:active、:focus这几个伪类,样式通过这些伪类实现,不去使用这几个state相关的class。通过鼠标事件修改的class通常只能管理鼠标操作的情况,键盘操作不能覆盖,远没有伪类来得正确。
没理解这个
from esui.
initMouseBehaviors
虽然提供,但不强制要求所有InputControl
子类一定调用。- 如果在鼠标悬浮、按下的时候,仅仅样式产生变化,则要求写
.ui-xxx:hover
而不是.ui-xxx-hover
,使用伪类解决问题。 - 事实上
initMouseBehaviors
产生的事件,在某些极端情况下没有伪类精准,比如“浏览器不在激活状态下元素移动过鼠标时某些版本的浏览器不触发mouseenter
事件但会触发:hover
伪类”。
from esui.
那,ui-xxx-hover有没有可能干掉,在Control层面?
from esui.
现在是有个initMouseBehavior
方法的,我觉得这个方法留着,且从helper
暴露出来,但是多数控件是不需要使用的,有需要的时候借用一下就好
from esui.
好吧,我再考虑考虑。未来,hover、press这种mouse相关的状态,我觉得都可以考虑不要了。
from esui.
已经在 808d8be 中移除了默认的鼠标交互,由CSS去实现,如果要js提供功能则则通过patch来做
from esui.
Related Issues (20)
- 日程投放控件 HOT 4
- InputCollection 应当继承 ControlCollection HOT 1
- Table 的 overflowX 属性为非 hidden 的时候多出一个横向滚动条 HOT 3
- BoxGroup有一处事件没使用addDOMEvent绑定
- 解决set和setProperties触发change的问题
- Table的依赖不全
- 控件初始化子控件时的valueReplacer管理
- 控件初始化子控件时的valueReplacer管理
- 控件初始化子控件时的valueReplacer管理
- 指定元素的销毁子控件
- Select 控件对于value比较判断的兼容性问题 HOT 2
- 希望能添加一些布局相关的组件 HOT 4
- 对于带有数据源的控件是否应该支持外部不提供数据源的场景的表决 HOT 19
- addChild的时候添加校验 HOT 6
- viewContext的疑问 HOT 3
- 加个Lisence HOT 1
- MonthView的年月下拉框格式可调 HOT 1
- 渐变背景的问题
- Panel控件的addContent方法不适用table布局 HOT 2
- 关于拓展组件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esui.