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

fix: make EventHandler better handle mouseenter/mouseleave events

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/alpadev/fix-mouseenter-mouseleave into main Mar 09, 2021
  • Overview 4
  • Commits 3
  • Pipelines 0
  • Changes 2

Created by: alpadev

This PR makes the EventHandler handle mouseenter and mouseleave more like their native counterparts.

Background

Currently the EventHandler is implemented to simply map mouseenter to mouseover and mouseleave to mouseout events - see this comment https://github.com/twbs/bootstrap/issues/31646#issuecomment-761166484

The problem is that mouseenter and mouseleave behave different to some extent but this wasn't respected yet. As such there are situations e.g. within the tooltip plugin where one does expect nested elements not to trigger the bound event handlers.

With the PR https://github.com/twbs/bootstrap/pull/33289 by @RyanBerliner this is addressed although in my opinion (and I assume Ryan agrees to some degree) some general fix to the EventHandler module would be more appropriate.

TBD

With this implementation the targets are not rewritten. In some situations e.g. when the window loses focus and some nested element is hovered when it receives back focus, the targets differ between mouseenter and mouseover.

Also like asked here https://github.com/twbs/bootstrap/discussions/33220 - are there any reasons as to why mouseover/mouseout was used in the first place?

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/alpadev/fix-mouseenter-mouseleave