zent icon indicating copy to clipboard operation
zent copied to clipboard

popover: won't close with disabled element as trigger

Open cpylua opened this issue 8 years ago • 4 comments

Popover won't close when moving out from trigger if the trigger is disabled.

Related issue:

  • https://github.com/facebook/react/issues/4251
  • https://github.com/react-component/tooltip/issues/18

Workaround: https://github.com/react-component/tooltip/issues/18#issuecomment-650864750

cpylua avatar Apr 05 '17 14:04 cpylua

The normal state transition for hover leave is out -> in -> out, a possible work-around is to add an option: quirk to skip the out -> in check.

cpylua avatar Apr 05 '17 15:04 cpylua

Not until React fixes the mouseleave issue.

Wrapping your disabled input within a div might help.

On Wed, Apr 26, 2017 at 7:52 PM, Ole Kristian Sandum < [email protected]> wrote:

Is this being addressed? Struggling with this as well...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/youzan/zent/issues/142#issuecomment-297377289, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsXEB4XEUSgCzf5fc_TU9lPnrN8OhZ9ks5rzy_8gaJpZM4M0Xh0 .

cpylua avatar Apr 26 '17 14:04 cpylua

Workaround: https://github.com/react-component/tooltip/issues/18#issuecomment-650864750

cpylua avatar Feb 26 '21 07:02 cpylua

目前 Popover / Pop / Tooltip 已经通过 fixTooltipOnDisabledChildren 参数来支持 Zent 组件库内的 Button, Input, Checkbox, Radio 的组件;自定义的组件需要自行通过上面提到的方案处理。

cpylua avatar Dec 08 '21 09:12 cpylua