Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-01-16 22:44:36 +0300
committerJulius Härtl <jus@bitgrid.net>2018-01-18 13:39:51 +0300
commit0064eb5873d228c9ef07c1e7715d5690eb8bab7d (patch)
tree5b122c90e9e5baad9d1a29aee924a783798d95d7
parentfcb76eb813cbc6b65fee810d5221c8b84cb302c0 (diff)
Fix duplicate iframe id
The duplicate id caused issues when closing the pdf preview while the sidebar was visible. In that case two DOM elements with the same id were present and the click event handler was registered to the wrong element. Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--js/previewplugin.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/previewplugin.js b/js/previewplugin.js
index e662bf8..62fff65 100644
--- a/js/previewplugin.js
+++ b/js/previewplugin.js
@@ -149,7 +149,7 @@ $(document).ready(function(){
var downloadUrl = Files.getDownloadUrl(model.get('name'), model.get('path'));
var viewer = OC.generateUrl('/apps/files_pdfviewer/?minmode=true&file={file}', {file: downloadUrl});
- var $iframe = $('<iframe id="pdframe" style="width:100%;height:' + previewHeight + 'px;display:block;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals" />');
+ var $iframe = $('<iframe id="pdframe-sidebar" style="width:100%;height:' + previewHeight + 'px;display:block;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals" />');
$thumbnailDiv.append($iframe);
$iframe.on('load', function() {