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
  • !33289

fix tooltips disappearing after trying to interact during their fade out animation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/RyanBerliner/bugfix/tooltip-appearence into main Mar 06, 2021
  • Overview 15
  • Commits 4
  • Pipelines 0
  • Changes 2

Created by: RyanBerliner

Resolves #32372 (closed), resolves #31646 (closed)

This points out that components that transition may have a blind spot in testing. Since transition duration & delay is computed using getTransitionDurationFromElement(element), which gets transitions from css, its always going to be returning 0 in the unit tests unless otherwise mocked or styled inline. That means that any components that use this transition method will have tests that mostly ignore them... which may not actually matter (likely true), but at least in this case it does matter.

Ideal in testing you'd mock the actual getTransitionDurationFromElement(element) imo, and just return the duration, however I was having some trouble getting jasmine spys to properly do this. I went for the next best thing in this case, which is mocking computed styles to get a non-zero return from that function. Happy to change it if anyones got ideas.

Preview: https://deploy-preview-33289--twbs-bootstrap.netlify.app/docs/5.0/components/tooltips/

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/RyanBerliner/bugfix/tooltip-appearence