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: prevent picker blur when still in focus at 2.7.x #620

Merged
merged 1 commit into from
Apr 17, 2023
Merged

fix: prevent picker blur when still in focus at 2.7.x #620

merged 1 commit into from
Apr 17, 2023

Conversation

luo3house
Copy link
Contributor

@vercel
Copy link

vercel bot commented Apr 14, 2023

@luo3house is attempting to deploy a commit to the React Component Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +325 to +333
const mouseDownEvent = new MouseEvent('mousedown', {
view: window,
bubbles: true,
});
Reflect.defineProperty(mouseDownEvent, 'target', {
value: wrapper.find('.suffix-icon').getDOMNode(),
enumerable: true,
});
fireEvent(window, mouseDownEvent);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems enzyme renders elements independently. I retrieved null by document.querySelector(). Besides, fireEvents(wrapper.find().getDOMNode()) not work. So placed this workaround.

@luo3house luo3house marked this pull request as ready for review April 14, 2023 03:47
@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #620 (b473ceb) into 2.7.x (3cc178f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head b473ceb differs from pull request most recent head 7d98df9. Consider uploading reports for the commit 7d98df9 to get more accurate results

@@           Coverage Diff           @@
##            2.7.x     #620   +/-   ##
=======================================
  Coverage   99.25%   99.25%           
=======================================
  Files          46       46           
  Lines        2160     2162    +2     
  Branches      643      644    +1     
=======================================
+ Hits         2144     2146    +2     
  Misses         14       14           
  Partials        2        2           
Impacted Files Coverage Δ
src/hooks/usePickerInput.ts 98.91% <100.00%> (+0.02%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yoyo837 yoyo837 merged commit 53d01f2 into react-component:2.7.x Apr 17, 2023
@luo3house luo3house deleted the patch-41608-2.7.x branch April 17, 2023 13:23
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