kendo-react icon indicating copy to clipboard operation
kendo-react copied to clipboard

Dialog looping the focus through elements breaks if there is a disabled button

Open kdikov82 opened this issue 3 years ago • 0 comments

Here is an example demonstrating the issue: https://stackblitz.com/edit/react-rhuis1-lezcgx?file=app%2Fmain.jsx

Within the onKeyDown event we should exclude disabled elements, because currently they are added in the "focusableElements" collection: onKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event) => { if (event.keyCode === Keys.esc && this.props.onClose) { event.preventDefault(); this.onCloseDialog(event); } const kDialog = this.element; if (kDialog && (event.keyCode === Keys.tab)) { const focusableElements = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';

kdikov82 avatar Aug 04 '22 13:08 kdikov82