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()) }