Skip to content

Commit 3997ee5

Browse files
authored
Merge pull request #6808 from nextcloud-libraries/backport/6807/stable8
[stable8] feat(NcPopover): add new `noFocusTrap` prop
2 parents 566fa1b + 603590d commit 3997ee5

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
# Changelog
77

8+
## [v8.26.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.26.0) (UNRELEASED)
9+
10+
### 📝 Notes
11+
#### NcPopover
12+
The `focusTrap` property is now deprecated and will be replaced with `noFocusTrap`,
13+
the reason behind this is to only have boolean properties with default value of `false` allowing shortcut props.
14+
815
## [v8.25.1](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.25.1) (2025-04-17)
916
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.25.0...v8.25.1)
1017

src/components/NcPopover/NcPopover.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,25 @@ export default {
208208
type: String,
209209
default: '',
210210
},
211+
211212
/**
212213
* Enable popover focus trap
214+
*
215+
* @deprecated use noFocusTrap instead
213216
*/
214217
focusTrap: {
215218
type: Boolean,
216219
default: true,
217220
},
221+
222+
/**
223+
* Disable the popover focus trap.
224+
*/
225+
noFocusTrap: {
226+
type: Boolean,
227+
default: false,
228+
},
229+
218230
/**
219231
* Set element to return focus to after focus trap deactivation
220232
*
@@ -310,7 +322,7 @@ export default {
310322
async useFocusTrap() {
311323
await this.$nextTick()
312324
313-
if (!this.focusTrap) {
325+
if (this.noFocusTrap || !this.focusTrap) {
314326
return
315327
}
316328

0 commit comments

Comments
 (0)