Make WordPress Core

Opened 7 weeks ago

Closed 4 weeks ago

#65943 closed defect (bug) (fixed)

wp-tooltip 7.1 bug

Reported by: wolf45 Owned by: joedolson
Priority: normal Milestone: 7.1.1
Component: General Version:
Severity: normal Keywords: has-patch commit fixed-major dev-reviewed
Cc: Focuses:

Description

Display Issues After Updating to 7.1

Version: 7.1

Uncaught DOMException: Element.matches: ':popover-open' is not a valid selector
    hideTooltip https://www.domain123.de/wp-includes/js/wp-tooltip.js?ver=7.1:38

https://i.imgur.com/u63D9JY.png

Change History (18)

#1 follow-up: @wildworks
7 weeks ago

  • Keywords reporter-feedback added

@wolf45 Thanks for the report.

Could you tell me which browser and version you are using? This is because the error occurs when the browser does not support the Popover API.

#2 @wildworks
7 weeks ago

  • Milestone Awaiting Review → 7.1.1

This shouldn't be a core issue, but I'll set the milestone to a minor release just in case.

#3 in reply to: ↑ 1 @wolf45
7 weeks ago

Replying to wildworks:

@wolf45 Thanks for the report.

Could you tell me which browser and version you are using? This is because the error occurs when the browser does not support the Popover API.

Firefox 115.39.0esr (32-Bit)

#4 @wildworks
6 weeks ago

Firefox 115.39.0esr (32-Bit)

Unfortunately, this version is not supported by WordPress. Although ​support has reportedly been extended until March 2027, it is unlikely that the Popover API will be supported. Furthermore, support may be discontinued in the near future.

I understand that there may be circumstances requiring the use of the ESR version. At the very least, we might be able to add exception handling to prevent errors.

For reference, issues related to Firefox ESR have occurred in the past, and a fallback was implemented at that time. See #64350.

cc @joedolson @afercia

This ticket was mentioned in ​Slack in #core by adrianduffell. ​View the logs.


5 weeks ago

This ticket was mentioned in ​PR #13408 on ​WordPress/wordpress-develop by ​@joedolson.


5 weeks ago
#6

  • Keywords has-patch added

Implement a check for popover, and if not available, hide popover panel.

Prevents errors from the potentially invalid selector :popover-open and prevents uncloseable panels.

Not yet tested in a browser that doesn't support popovers, so this is currently hypothetical.

Trac ticket: https://core.trac.wordpress.org/ticket/65943

## Use of AI Tools
None

#7 @joedolson
5 weeks ago

It's certainly plausible to gate the behavior and prevent fatal errors on older browsers. It doesn't make any sense to try and polyfill this, but we can prevent it from causing problems.

#8 @joedolson
5 weeks ago

  • Keywords reporter-feedback removed

This ticket was mentioned in ​Slack in #core by adamsilverstein. ​View the logs.


4 weeks ago

​@adamsilverstein commented on ​PR #13408:


4 weeks ago
#10

Nice one @joedolson - feel free to proceed if you want to get this in by 7.1.1 (RC on Sept. 10th).

#11 @adamsilverstein
4 weeks ago

  • Keywords commit added
  • Owner set to joedolson
  • Status new → assigned

#12 @joedolson
4 weeks ago

  • Resolution → fixed
  • Status assigned → closed

In 63543:

Administration: Prevent errors in wp-tooltip.js on browsers without popover support.

Add a feature gate so that the tooltip JS hides popover panels on browsers without popover support, and doesn't execute calls that can trigger errors.

There are no browsers within the WordPress support matrix without popover support, but gating this feature gives users of older browsers a better experience with minimal change.

Props wolf45, wildworks, adamsilverstein, joedolson.
Fixes #65943.

#13 @joedolson
4 weeks ago

  • Keywords dev-feedback fixed-major added
  • Resolution fixed
  • Status closed → reopened

Re-opening for 2nd committer sign off and merge consideration for 7.1.1.

#14 @adamsilverstein
4 weeks ago

The code change looks good to me @joedolson - I'm going to try testing the fix using an older firefox.

​@adamsilverstein commented on ​PR #13408:


4 weeks ago
#15

I installed an older version of firefox and verified the issue as well as the fix in this PR:

Check:
https://github.com/user-attachments/assets/9f21a9dd-706d-4a77-853f-81b8a8413b5c

Before:
https://github.com/user-attachments/assets/550e38d7-a44c-4eaf-8cd7-d3651ddde0aa

After:
https://github.com/user-attachments/assets/943541e0-b563-4dff-b38b-8ddf0798d65d

#16 @adamsilverstein
4 weeks ago

  • Keywords dev-reviewed added; dev-feedback removed

#17 @adamsilverstein
4 weeks ago

Good to backport @joedolson

#18 @joedolson
4 weeks ago

  • Resolution → fixed
  • Status reopened → closed

In 63548:

Administration: Prevent errors in wp-tooltip.js on browsers without popover support.

Add a feature gate so that the tooltip JS hides popover panels on browsers without popover support, and doesn't execute calls that can trigger errors.

There are no browsers within the WordPress support matrix without popover support, but gating this feature gives users of older browsers a better experience with minimal change.

Reviewed by adamsilverstein.
Merges [63543] to the 7.1 branch.

Props wolf45, wildworks, adamsilverstein, joedolson.
Fixes #65943.

Note: See TracTickets for help on using tickets.