Fix modal support for vue apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6b5db20fc9
commit
7723529d31
|
@ -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 New Issue