Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !35682

fix isVisible behavior with new chrome version

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/RyanBerliner/fix-is-visible into main Jan 12, 2022
  • Overview 1
  • Commits 5
  • Pipelines 0
  • Changes 2

Created by: RyanBerliner

First found in #35659 (specific comment with details), this fixes a bug in the isVisible utility that was introduced with the latest version of chrome 97.0.4692.71. Previous to the chrome update the following html would produce a 0 length getClientRects() when run on the span being checked.

<details>
   <span>This is the element being checked by isVisible</span>
</details>

This meant that we didn't need any special handling for this case. However, after the chrome update, it returns non-zero length results, and it doesn't look like we can rely on it for all our visibility information. The changes in this PR add explicit support for checking visibility of elements inside the <details> element. Should chrome ever revert their behavior, this should certainly still function, albeit a bit redundant.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/RyanBerliner/fix-is-visible