notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
https://notiflix.github.io
MIT License
635 stars 55 forks source link

When there's a Report opened it's still possible to navigate the page using the Tab key #41

Closed RavazziniAndrea closed 3 years ago

RavazziniAndrea commented 3 years ago

Describe the bug As said in the title, whenever there's a Report opened in fullscreen, the page is still navigable using the Tab key and with the Enter key links are still clickable.

Expected behavior In my opinion, the report has to be closed by pressing che Enter key and the Tab has to be blocked in the mean time.

Desktop:

furcan commented 3 years ago

Hi @RavazziniAndrea ,

Notiflix is a non-blocking notification library. So, this library can not predict which events and/or elements should be prevented and/or blocked.

You have to create your own solution/approach to prevent and/or block the events/elements.

An example is below.

var blockThem = function () {
    // your codes...
};

var unblockThem = function () {
    // your codes...
};

// ---
// ---
// ---

blockThem();
Notiflix.Report.info(
    'Title',
    'Description',
    'Button Text',
    // Button onClick callback func
    function cb() {
        unblockThem();
    },
);

Thanks, Furkan.