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

Fix regression for handling `mouseenter`/`mouseleave` events introduced by #33310

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/alpadev/fix-regression-mouseevents into main Apr 18, 2021
  • Overview 1
  • Commits 4
  • Pipelines 0
  • Changes 2

Created by: alpadev

Sorry had a little logic error with this.

The old logic was based on relatedTarget to contain the delegatedTarget.

This is correct while moving from the parent onto a child element (mouseover) with the relatedTarget being the parent element that contains the delegatedTarget (child). And also while moving from the child onto the parent (mouseout) with the relatedTarget being the parent element that contains the delegatedTarget (child).

So for parent-child relationships this was working totally fine.

The problem comes when moving onto sibling or unconnected elements. The updated logic should handle this properly now, as it checks for the delegatedTarget not to contain the relatedTarget. Which is the case for parent (related) -- mouseover --> child (delegated) and parent (related) <-- mouseout -- child (delegated) movements. And also with sibling/unconnected (related) -- mouseover --> listener (delegated) and sibling/unconnected (related) <-- mouseout -- listener (delegated).

Sorry again.. 😓

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