Comparing version 8.1.4 to 8.1.5
@@ -5,2 +5,10 @@ # Changelog | ||
### [8.1.5](https://github.com/hybridsjs/hybrids/compare/v8.1.4...v8.1.5) (2022-09-27) | ||
### Bug Fixes | ||
* **layout:** support negative dimensions ([6b6c01c](https://github.com/hybridsjs/hybrids/commit/6b6c01c739e2c74ad9de2c6f7f3f8dfe65ef815a)) | ||
* **router:** focus trap and scroll clearing for dialogs ([db8a80a](https://github.com/hybridsjs/hybrids/commit/db8a80a8dd373be983a94d308b34ea9c5bf1ec07)) | ||
### [8.1.4](https://github.com/hybridsjs/hybrids/compare/v8.1.3...v8.1.4) (2022-09-21) | ||
@@ -7,0 +15,0 @@ |
{ | ||
"name": "hybrids", | ||
"version": "8.1.4", | ||
"version": "8.1.5", | ||
"description": "A JavaScript framework for creating fully-featured web applications, components libraries, and single web components with unique declarative and functional architecture", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -265,3 +265,3 @@ import global from "./global.js"; | ||
if (!nestedParent) { | ||
if (!nestedParent && !options.dialog) { | ||
callbacks.push(restoreLayout); | ||
@@ -279,4 +279,6 @@ } | ||
const focusDialog = () => { | ||
focusElement(host); | ||
const focusDialog = (event) => { | ||
if (!host.contains(event.target) && event.target !== host) { | ||
focusElement(host); | ||
} | ||
}; | ||
@@ -287,4 +289,6 @@ | ||
console.log({ prevActiveEl }); | ||
root.addEventListener("focusin", focusDialog); | ||
host.addEventListener("focusout", focusDialog); | ||
root.addEventListener("focusout", focusDialog); | ||
host.addEventListener("keydown", goBackOnEscKey); | ||
@@ -296,3 +300,3 @@ | ||
root.removeEventListener("focusin", focusDialog); | ||
host.removeEventListener("focusout", focusDialog); | ||
root.removeEventListener("focusout", focusDialog); | ||
host.removeEventListener("keydown", goBackOnEscKey); | ||
@@ -299,0 +303,0 @@ |
@@ -146,3 +146,3 @@ import global from "../global.js"; | ||
if (/^\d+(\.\d+)*$/.test(String(value))) { | ||
if (/^-?\d+(\.\d+)*$/.test(String(value))) { | ||
return `${value * 8}px`; | ||
@@ -149,0 +149,0 @@ } |
444458
6667