diff --git a/package-lock.json b/package-lock.json index 2cc0f7c..97dd110 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "@aurodesignsystem/auro-library", - "version": "3.0.2", + "version": "3.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@aurodesignsystem/auro-library", - "version": "3.0.2", + "version": "3.0.4", "license": "Apache-2.0", "dependencies": { + "@floating-ui/dom": "^1.6.11", "handlebars": "^4.7.8", "markdown-magic": "^2.6.1", "npm-run-all": "^4.1.5" @@ -968,6 +969,31 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@floating-ui/core": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.12.tgz", + "integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", + "license": "MIT" + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", diff --git a/package.json b/package.json index 31b3af2..1b21f1f 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "dependencies": { "handlebars": "^4.7.8", "markdown-magic": "^2.6.1", + "@floating-ui/dom": "^1.6.11", "npm-run-all": "^4.1.5" } } diff --git a/scripts/runtime/floatingUI.mjs b/scripts/runtime/floatingUI.mjs index bde7afb..83b529c 100644 --- a/scripts/runtime/floatingUI.mjs +++ b/scripts/runtime/floatingUI.mjs @@ -314,6 +314,9 @@ export default class AuroFloatingUI { this.handleFocusLoss(); break; case 'click': + if (document.activeElement === document.body) { + event.currentTarget.focus(); + } this.handleClick(); break; default: