Skip to content

Commit

Permalink
Merge pull request #4498 from thematters/fix/align-page-down-event
Browse files Browse the repository at this point in the history
fix(article-details): update to the correct inclusion logic
  • Loading branch information
byhow authored May 30, 2024
2 parents 24d66d6 + 3d2abf2 commit 3ffdbfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/ArticleDetail/Toolbar/FloatToolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const FloatToolbar = ({
if (
key in keyToScrollDirection &&
floatingToolbarRef.current &&
event.target &&
floatingToolbarRef.current.contains(event.target as HTMLElement)
event.target instanceof HTMLElement &&
event.target.contains(floatingToolbarRef.current)
) {
event.preventDefault()
const remInPixels = parseFloat(
Expand Down

0 comments on commit 3ffdbfa

Please sign in to comment.