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

Use the backdrop util in offcanvas, enforcing consistency

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged GeoSot requested to merge gs-add-backdrop-functionality-to-offcanvas into main Apr 04, 2021
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 6

This PR makes use of a separated util, backdrop, and reverts some assumptions that had been made in order to proceed the initial Offcanvas PR

Based on #32439

Background:

The initial idea was to decouple Modal backdrop functionality, as it was scattered inside modal.js, giving the opportunity on modal.js to focus on vital things, and after merging to use it in offcanvas. It was referenced sometimes here Unfortunately merge process of #32439 stuck about 3 months ago. But Offcanvas had to go on.

So with this PR, I am trying to complete the initial plan:

  • respect /share modal's backdrop functionality, keeping consistency
  • listen click events over backdrop (only) and trigger hide() without add/remove event tricks
  • achieve to hide foreign open offcanvas instances without glitches if (allReadyOpen && allReadyOpen !== target), in case another is going to be open, when user clicks on trigger button

Closes #33471, closes #33457 (closed), closes #33447 (closed), closes #33535 (closed), closes #33564 (closed)

Preview: https://deploy-preview-33545--twbs-bootstrap.netlify.app/docs/5.0/components/offcanvas/

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: gs-add-backdrop-functionality-to-offcanvas