Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix picker in shadowdom #213

Merged
merged 1 commit into from
Feb 7, 2021

Conversation

icaife
Copy link
Contributor

@icaife icaife commented Feb 7, 2021

fix event.target if event triggered in shadow dom

@vercel
Copy link

vercel bot commented Feb 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/picker/eycw5qt8l
✅ Preview: https://picker-git-fork-icaife-fix-fix-picker-in-shadowdom.react-component.now.sh

@codecov
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #213 (302d18a) into master (ce17134) will decrease coverage by 0.04%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
- Coverage   99.61%   99.57%   -0.05%     
==========================================
  Files          45       45              
  Lines        2094     2101       +7     
  Branches      616      617       +1     
==========================================
+ Hits         2086     2092       +6     
- Misses          6        7       +1     
  Partials        2        2              
Impacted Files Coverage Δ
src/utils/uiUtil.ts 99.22% <85.71%> (-0.78%) ⬇️
src/hooks/usePickerInput.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce17134...302d18a. Read the comment docs.

preventBlurRef.current = true;

// Always set back in case `onBlur` prevented by user
requestAnimationFrame(() => {
preventBlurRef.current = false;
});
} else if (!focused) {
} else if (!focused || clickedOutside) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个没有意义吧,else if 时 clickedOutside 一定是 true 的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants