kamranahmedse / driver.js

A light-weight, no-dependency, vanilla JavaScript engine to drive the user's focus across the page

Home Page:https://driverjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to avoid exiting when clicking on the mask

YikaiHu opened this issue · comments

I need a close button to close and don't want to click the overlay to close

I think should expose a config overlayClosable : boolean to control the action

Hi @YikaiHu,

I encountered the same issue and found a solution to get around this problem.
Start by using the allowClose: false option in your driverObj configuration:

const driverObj = driver.js.driver({
    allowClose: false,
});

Then create a CSS class to display the close button:

.driver-popover-close-btn {
    display: flex !important;
}

Thanks a lot @altheaFeu , I will have a try next week.