openproject-primer_view_components 0.56.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/dialog_helper.js +3 -0
- data/app/components/primer/dialog_helper.ts +3 -0
- data/lib/primer/view_components/version.rb +1 -1
- metadata +2 -2
@@ -102,6 +102,9 @@ export class DialogHelperElement extends HTMLElement {
|
|
102
102
|
// The click target _must_ be the dialog element itself, and not elements underneath or inside.
|
103
103
|
if (target !== dialog || !dialog?.open)
|
104
104
|
return;
|
105
|
+
// If the dialog contains a form, do not close the dialog when clicking outside of the dialog
|
106
|
+
if (dialog.querySelector('form'))
|
107
|
+
return;
|
105
108
|
const rect = dialog.getBoundingClientRect();
|
106
109
|
const clickWasInsideDialog = rect.top <= event.clientY &&
|
107
110
|
event.clientY <= rect.top + rect.height &&
|
@@ -111,6 +111,9 @@ export class DialogHelperElement extends HTMLElement {
|
|
111
111
|
// The click target _must_ be the dialog element itself, and not elements underneath or inside.
|
112
112
|
if (target !== dialog || !dialog?.open) return
|
113
113
|
|
114
|
+
// If the dialog contains a form, do not close the dialog when clicking outside of the dialog
|
115
|
+
if (dialog.querySelector('form')) return
|
116
|
+
|
114
117
|
const rect = dialog.getBoundingClientRect()
|
115
118
|
const clickWasInsideDialog =
|
116
119
|
rect.top <= event.clientY &&
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openproject-primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.56.
|
4
|
+
version: 0.56.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|