WhatSock / apex

Apex 4X: The Comprehensive ARIA Development Suite
MIT License
28 stars 10 forks source link

Datapicker lost focus inside modal #42

Closed impetoyt closed 1 year ago

impetoyt commented 1 year ago

inside a boostrap 5 modal using the keyboard:

1) by pressing TAB I move the focus until I reach the button picker 2) by click ENTER and the picker opens 3) by click ESC, the picker closes but the focus will not automatically move on the input field. The focus just disappear.

accdc commented 1 year ago

Hi, can you paste the url for the page where you are seeing this behavior? Thanks, Bryan

accdc commented 1 year ago

Hi, I looked into this, if you are going to use the 4X Datepicker inside another framework such as a Bootstrap modal, it may be necessary to add the "afterRemove" method to the datepicker config script to manually move focus to another element after the datepicker finishes closing. This will fire after the datepicker animation completes.

E.G.

afterRemove: function (dc) {
console.log('afterRemove');
// Move focus somewhere specific...
},

You can review all the config options on the page at: https://whatsock.com/Templates/Datepickers/index.htm

I can't debug Bootstrap, but please reopen this issue if you are receiving any console errors with the Apex 4X behavior or functionality that are being caused specifically by 4X.