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(components): [dropdown] fix #8311 #8338

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

CarterLi
Copy link
Contributor

  • dropdown/src/content.vue: triggeringElementRef is a reference of
    el-button component, not the button dom object. We should get its
    dom object before passing it to virtual-ref.
  • popper/src/content.vue: referenceEl is triggeringElementRef, which
    is a dom object. Because both dom object and its instance function
    getBoundingClientRect are not reactive, watching their changes are of
    non-sence.

It's strange that it worked before v2.2.6, don't know what happened

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

* dropdown/src/content.vue: `triggeringElementRef` is a reference of
`el-button` component, not the `button` dom object. We should get its
dom object before passing it to `virtual-ref`.
* popper/src/content.vue: `referenceEl` is `triggeringElementRef`, which
is a dom object. Because both dom object and its instance function
`getBoundingClientRect` are not reactive, watching their changes are of
non-sence.

It's strange that it worked before v2.2.6, don't know what happened
@pull-request-triage
Copy link

👋 @CarterLi, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

github-actions bot commented Jun 18, 2022

@github-actions
Copy link

Hello @CarterLi, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@CarterLi
Copy link
Contributor Author

Please release a hot fix version. This bug broke my project again.

I'm trying to be polite and only hope we can fix it ASAP. @jw-foss

@github-actions
Copy link

🧪 Playground Preview: https://element-plus.run/?pr=8338
Please comment the example via this playground if needed.

@CarterLi
Copy link
Contributor Author

It turns out that it was vueuse/vueuse#1657 that broke element-plus.

@DrJume
Copy link

DrJume commented Jun 18, 2022

VueUse has fixed the regression in https://github.com/vueuse/vueuse/releases/tag/v8.7.4

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

Successfully merging this pull request may close these issues.

None yet

2 participants