Andarist / Andarist/use-onclickoutside
Clashes with mouse down events creating the element
未關閉
- 主要語言
- TypeScript
- 星號
- 496
- 分支
- 27
- PR 合併指標
- 30 天內沒有已合併 PR
描述
It seems like one of the main use cases for this library is creating modals / popups / etc when a button is pressed, but if you happen to use the `onMouseDown` event handler to trigger that behaviour, `onClickOutside` will immediately trigger its own handler.
I've created a very simple sandbox to demonstrate this: https://codesandbox.io/s/musing-johnson-h8qhf
The expected behaviour is that clicking any of those buttons should display the extra `div`, and, once it is displayed, clicking anywhere outside the div should hide it. However, the first button triggers the extra `div` to be added and then immediately removed.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。