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
  • Issues
  • #33491
Closed
Open
Issue created Mar 27, 2021 by Administrator@rootContributor

V5 Offcanvas - Option to disable auto hide when offcanvas loses focus.

Created by: scoizzle

Currently in v5.0.0-beta 3:

Offcanvas will autohide when it loses focus. IE you click anywhere other than the offcanvas area.

What I'm suggesting:

Add data-bs-autohide boolean value to config options for Offcanvas. Default for data-bs-autohide is true; to maintain existing compatibility.

Disable event registration for EVENT_CLICK_DISMISS when data-bs-autohide is set to false.

Alternatively, to allow changing of this property via the data attribute, allow the event to still be registered, but change the event handler to respect the autohide property.

Examples of the modifications required to implement change follow.

` const Default = { backdrop: true, keyboard: true, scroll: false, autohide: true }

const DefaultType = { backdrop: 'boolean', keyboard: 'boolean', scroll: 'boolean', autohide: 'boolean' } `

if (!this._config.autohide) { EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide()) }

Assignee
Assign to
Time tracking