Skip to content

Commit 4c1a490

Browse files
committed
FIX: missing case for closeBy
1 parent df752d4 commit 4c1a490

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dialog.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export default function (Alpine) {
4949
* Prevent native escape for AlpineJs logic
5050
*/
5151
function escapeDialog(event) {
52-
if (event.key === "Escape" && !canEvaluate) {
52+
if (event.key !== "Escape") return;
53+
54+
if (closeBy === "none" || !canEvaluate) {
5355
event.preventDefault();
5456
}
5557
}

0 commit comments

Comments
 (0)