Skip to content
Snippets Groups Projects
Commit 4a0d9399 authored by hakimel's avatar hakimel
Browse files

don't convert anchors with child nodes to rolling links (closes #266)

parent 0d66c91e
No related branches found
No related tags found
No related merge requests found
...@@ -527,14 +527,14 @@ var Reveal = (function(){ ...@@ -527,14 +527,14 @@ var Reveal = (function(){
for( var i = 0, len = nodes.length; i < len; i++ ) { for( var i = 0, len = nodes.length; i < len; i++ ) {
var node = nodes[i]; var node = nodes[i];
if( node.textContent && !node.querySelector( 'img' ) && ( !node.className || !node.classList.contains( node, 'roll' ) ) ) { if( node.textContent && !node.querySelector( '*' ) && ( !node.className || !node.classList.contains( node, 'roll' ) ) ) {
var span = document.createElement('span'); var span = document.createElement('span');
span.setAttribute('data-title', node.text); span.setAttribute('data-title', node.text);
span.innerHTML = node.innerHTML; span.innerHTML = node.innerHTML;
node.classList.add( 'roll' ); node.classList.add( 'roll' );
node.innerHTML = ''; node.innerHTML = '';
node.appendChild(span); node.appendChild(span);
} }
} }
} }
...@@ -964,20 +964,20 @@ var Reveal = (function(){ ...@@ -964,20 +964,20 @@ var Reveal = (function(){
if( previousSlide ) { if( previousSlide ) {
previousSlide.classList.remove( 'present' ); previousSlide.classList.remove( 'present' );
// Reset all slides upon navigate to home // Reset all slides upon navigate to home
// Issue: #285 // Issue: #285
if ( document.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) { if ( document.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) {
// Launch async task // Launch async task
setTimeout( function () { setTimeout( function () {
var slides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i; var slides = toArray( document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i;
for( i in slides ) { for( i in slides ) {
if( slides[i] ) { if( slides[i] ) {
// Reset stack // Reset stack
setPreviousVerticalIndex( slides[i], 0 ); setPreviousVerticalIndex( slides[i], 0 );
} }
} }
}, 0 ); }, 0 );
} }
} }
updateControls(); updateControls();
......
This diff is collapsed.
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