Skip to content

Commit

Permalink
Fix additionalTrapElements to accept HTMLelements as well
Browse files Browse the repository at this point in the history
Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Jan 23, 2024
1 parent d244701 commit 2996abf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/NcDialog/NcDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ export default defineComponent({
/** Additional elements to add to the focus trap */
additionalTrapElements: {
type: Array,
validator: (arr) => Array.isArray(arr) && arr.every((element) => typeof element === 'string'),
validator: (arr) => {
return (
Array.isArray(arr) && arr.every(
(element) =>
typeof element === 'string' || element instanceof HTMLElement

Check warning on line 169 in src/components/NcDialog/NcDialog.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing trailing comma
)
);

Check failure on line 171 in src/components/NcDialog/NcDialog.vue

View workflow job for this annotation

GitHub Actions / eslint

Extra semicolon
},
default: () => ([]),
},
Expand Down

0 comments on commit 2996abf

Please sign in to comment.