Skip to content
Snippets Groups Projects
Unverified Commit e7a36525 authored by Hakim El Hattab's avatar Hakim El Hattab Committed by GitHub
Browse files

Merge pull request #2251 from oyron/2229-speaker-notes-bug

Give focus to previously opened speaker notes (fixes #2229)
parents fb089e70 f32cd858
No related branches found
No related tags found
No related merge requests found
......@@ -11,15 +11,22 @@
*/
var RevealNotes = (function() {
var notesPopup = null;
function openNotes( notesFilePath ) {
if (notesPopup && !notesPopup.closed) {
notesPopup.focus();
return;
}
if( !notesFilePath ) {
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
notesFilePath = jsFileLocation + 'notes.html';
}
var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
if( !notesPopup ) {
alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment