Skip to content

Commit 2c2b1cf

Browse files
Fix: Update iframe selector to use 'preview-iframe' class
The 'Open in New Tab' button was not working because it was looking for an iframe with class 'preview', but the UI revamp changed it to 'preview-iframe'. This updates the JavaScript selector to match. - Update to in open-preview click handler - Update to in refreshPreview function Fixes the bug where clicking 'Open in New Tab' opened a blank page.
1 parent 88a686c commit 2c2b1cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/registry/views/static/info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ oc.cmd.push(function() {
2525
url += splitted[1];
2626
}
2727
28-
$('.preview').attr('src', url);
28+
$('.preview-iframe').attr('src', url);
2929
3030
return false;
3131
};
@@ -95,7 +95,7 @@ oc.cmd.push(function() {
9595
9696
$('.open-preview').click(function() {
9797
refreshPreview();
98-
var url = $('.preview').attr('src');
98+
var url = $('.preview-iframe').attr('src');
9999
100100
window.open(url, '_blank');
101101
return false;

0 commit comments

Comments
 (0)