Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent dropdown close on expand in Firefox (#231)
## What does it do? Prevents event bubbling on node expand-click. The function isOutsideClick only gets a short part of two items (li.node + i.expand), then the parents stop, in Firefox. This causes it to be detected as an outside click. In chrome the path is instead empty and no outside click is therefore detected. Fixes #198 Can test here (switching between v1.17/developTemp): Expand the first two nodes: ![bild](https://user-images.githubusercontent.com/17863113/55436725-5bce8b80-559d-11e9-927d-17149643100c.png) Scroll to bottom and expand: ![bild](https://user-images.githubusercontent.com/17863113/55436759-6c7f0180-559d-11e9-8bd9-7ad141b5c9ca.png) https://ellinge.github.io/react-dropdown-tree-select-test/#v117-nocheckeddefault https://ellinge.github.io/react-dropdown-tree-select-test/#DevelopTemp-nocheckeddefault There still seems to be some issue with scroll in firefox after initial scroll and expand which does not happen in chrome. The expanded item gets out of view. This also happens on scoll and check. ## Type of change - [x] Bug fix
- Loading branch information