Skip to content

Commit

Permalink
release 1.2.3 for fix bug of autoDetect
Browse files Browse the repository at this point in the history
  • Loading branch information
vannoel committed Dec 13, 2020
1 parent 6ee9cf4 commit 28d9f13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.2.3

> Dec, 13, 2020
- **Issue**: Fix bug of autoDetect.

## v1.2.2

> Sep, 12, 2020
Expand Down
12 changes: 2 additions & 10 deletions module/components/Popover.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const Popover = React.forwardRef((props, ref) => {
useEffect(() => {
_resize();
window.addEventListener('resize', _resize);
window.addEventListener('scroll', _scroll);
window.addEventListener('scroll', _resize);
return function cleanup() {
window.removeEventListener('resize', _resize);
window.removeEventListener('scroll', _scroll);
window.removeEventListener('scroll', _resize);
};
}, []);

Expand Down Expand Up @@ -65,14 +65,6 @@ const Popover = React.forwardRef((props, ref) => {
});
}
}
function _scroll() {
if (env.autoDetect) {
env.state_autoAdjust.onAdjust({
...env.state_autoAdjust.value,
..._detectY()
});
}
}

function _clickListener (event) {
let result = event.composedPath().find((node) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@blacktoolbox/react-popover",
"packageName": "btblab-react-popover",
"version": "1.2.2",
"version": "1.2.3",
"description": "Popover maker based on React",
"keywords": [
"blacktoolbox",
Expand Down

0 comments on commit 28d9f13

Please sign in to comment.