mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Fix modal support for vue apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
13f119d48d
commit
b1f74b0056
1 changed files with 6 additions and 1 deletions
7
core/src/jquery/ocdialog.js
vendored
7
core/src/jquery/ocdialog.js
vendored
|
|
@ -210,9 +210,14 @@ $.widget('oc.ocdialog', {
|
|||
}
|
||||
|
||||
const self = this
|
||||
let contentDiv = $('#content')
|
||||
if (contentDiv.length === 0) {
|
||||
// nextcloud-vue compatibility
|
||||
contentDiv = $('.content')
|
||||
}
|
||||
this.overlay = $('<div>')
|
||||
.addClass('oc-dialog-dim')
|
||||
.appendTo($('#content'))
|
||||
.appendTo(contentDiv)
|
||||
this.overlay.on('click keydown keyup', function(event) {
|
||||
if (event.target !== self.$dialog.get(0) && self.$dialog.find($(event.target)).length === 0) {
|
||||
event.preventDefault()
|
||||
|
|
|
|||
Loading…
Reference in a new issue