-
-
Notifications
You must be signed in to change notification settings - Fork 50.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Tooltip on disabled button #4865
Conversation
afc163
commented
Feb 14, 2017
•
edited
Loading
edited
- ref mouseleave don't trigger on disabled inputs and button react-component/tooltip#18
- Close Tooltip和disabled Button一起使用,mouseout的时候Tooltip没有隐藏 #1816
- Close Tooltip acts weird on the disabled button inside the table row. #4346
- Close Tooltip 和 Button(disabled) 混用BUG #2381
- Close Tooltip acts weird on the disabled button inside the table row. #4346
- Close popover/tooltip chilren为button disabled 时 hoverout 失效 #4602
- Close Button禁用后Tooltip不会正常消失。 #2097
@afc163, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjycui, @waywardmonkeys and @jljsj33 to be potential reviewers. |
f47ead2
to
6e1a659
Compare
Changes Unknown when pulling 6e1a659 on fix-tooltip-on-disabled-button into ** on master**. |
覆盖率为啥会下降?@yesmeck |
@ @ 不是很清楚。。因为现在的覆盖率本来就是有点不准的,是按 Babel 转换后的代码计算的,而不是按 TypeScript 计算的。 |
707df13
to
449a6a6
Compare
Changes Unknown when pulling 449a6a6 on fix-tooltip-on-disabled-button into ** on master**. |
变成 unknown 了... |
const button = wrapper.find('button').at(0); | ||
button.simulate('mouseenter'); | ||
expect(onVisibleChange).not.toHaveBeenCalled(); | ||
expect(wrapper.ref('tooltip').prop('visible')).toBe(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to me, Tooltip
's visible should be true and onVisibleChange
should be called when mouse enter button
, right?
expect(wrapper.ref('tooltip').prop('visible')).toBe(false); | ||
|
||
button.simulate('mouseleave'); | ||
expect(onVisibleChange).not.toHaveBeenCalled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be called, too.
774858a
to
adc2068
Compare