Skip to content

Notes plugin: notes from inactive fragments mess with slide-level notes #3478

@skyboyer

Description

@skyboyer

If we have notes inside fragments through <aside class="notes"> like

<section>
	<p>1</p>
	<p class="fragment">
		2
		<aside class="notes">fragment 2 notes</aside>
	</p>
	<p class="fragment">
		3
		<aside class="notes">fragment 3 notes</aside>
	</p>
</section>

We have:

  • all fragment-level notes are combined and shown as slide-level notes("fragment 2 notes fragment 3 notes")
  • when reaching fragments with notes, their notes are not shown exclusively

If we use data-notes instead, everything works fine:

<section>
	<p>1</p>
	<p class="fragment" data-notes="fragment 2 notes">
		2
	</p>
	<p class="fragment" data-notes="fragment 3 notes">
		3
	</p>
</section>

Root cause: plugin's logic treats all the aside.notes as slide-level notes, even if they are wrapped into .fragment:

let slideElement = deck.getCurrentSlide(),
	notesElements = slideElement.querySelectorAll( 'aside.notes' ),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions