From: Joas Schilling Date: Mon, 15 Jun 2020 14:42:45 +0000 (+0200) Subject: Fix modal support for vue apps X-Git-Tag: v20.0.0beta1~407^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b1f74b0056b76402fbd618faff817432dec77ee3;p=nextcloud-server.git Fix modal support for vue apps Signed-off-by: Joas Schilling --- 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 = $('
') .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()