summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-15 16:42:45 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-15 16:56:13 +0200
commitb1f74b0056b76402fbd618faff817432dec77ee3 (patch)
tree96dec6b29e664b58f8f6bbed33e8762831a7d952 /core/src
parent13f119d48d091b8b1cc789b590a235086a077d93 (diff)
downloadnextcloud-server-b1f74b0056b76402fbd618faff817432dec77ee3.tar.gz
nextcloud-server-b1f74b0056b76402fbd618faff817432dec77ee3.zip
Fix modal support for vue apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/jquery/ocdialog.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/jquery/ocdialog.js b/core/src/jquery/ocdialog.js
index 518a28f75d3..8c4a7602a78 100644
--- a/core/src/jquery/ocdialog.js
+++ b/core/src/jquery/ocdialog.js
@@ -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()