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

Switch locales selector JS error #8468

Merged

Conversation

stevedya
Copy link
Contributor

@stevedya stevedya commented Apr 29, 2022

Addresses #8466. Error caused by tippy trying to disable a hoverTooltipInstance that doesn't exist.

Fix applied

-Wrapped hoverTooltipInstance inside of an if statement to ensure it exists before trying to call disable or enable. This is needed as hover-tooltip-content is an optional attribute which turns this feature on and off.

-Removed multiple: true on tippy instances as it is not needed anymore. This addresses #8462 as well.
Extra Info about this: Since we are using two instances of tippy on the same element for the actions toggle specifically, using the multiple: true attribute allowed us to have multiple instances of tippy for the same element. However in tippy v5 and v6 is they've changed it so as long as you reference the same element it will init multiple for the same tippy instance. Tippy migration notes

@squash-labs
Copy link

squash-labs bot commented Apr 29, 2022

Manage this branch in Squash

Test this branch here: https://stevedyachore8466-switch-local-909va.squash.io

@stevedya stevedya requested a review from thibaudcolas May 3, 2022 14:19
@gasman gasman added this to the 3.0 milestone May 3, 2022
@lb- lb- added status:Needs Review component:i18n i18n for content created in Wagtail, not the admin UI itself component:Frontend labels May 4, 2022
Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

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

pikachu-surprise

@thibaudcolas thibaudcolas merged commit 95fcddd into wagtail:main May 6, 2022
thibaudcolas pushed a commit that referenced this pull request May 6, 2022
* Check for hover tool tip instance to avoid throwing errors

* Remove multiple attr because it is un-needed now
stevedya added a commit to stevedya/wagtail that referenced this pull request May 18, 2022
…gtail#8462

* Check for hover tool tip instance to avoid throwing errors

* Remove multiple attr because it is un-needed now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:Frontend component:i18n i18n for content created in Wagtail, not the admin UI itself
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants