Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retained Themes with Multiple Themes and TOC Navigation #105

Open
bluefirepatrick opened this issue Feb 3, 2025 · 3 comments
Open

Retained Themes with Multiple Themes and TOC Navigation #105

bluefirepatrick opened this issue Feb 3, 2025 · 3 comments
Assignees

Comments

@bluefirepatrick
Copy link
Member

There is an issue where Themes are retained on certain chapters after changing the theme and navigating with the TOC.
I have tested this on Safari, Chrome and Firefox for MacOS.

Steps to reproduce:
From playground/sheets

  1. Open Moby Dick (reflow)
  2. Use the TOC to navigate to a Chapter 6
  3. Page forward to Chapter 7.
  4. Change the Theme to Paper
  5. Page forward to Chapter 8.
  6. Change the Theme to Contrast 2.
  7. Page forward to Chapter 9.
  8. Change the Theme to Contrast 1.
  9. Use the TOC to jump to Chapter 5.
  10. Page forward through the Chapters.

Some chapters are retaining old themes.

This seems to be tied to adjacent chapter that have been loaded and themed, perhaps due to caching in _cframes. Different browsers seem to have different manifestations of the issue but all have some form of retained themes.

Using the arrow key pagination buttons alone does not cause this issue.

@JayPanoz
Copy link
Contributor

JayPanoz commented Feb 3, 2025

Ah yeah thanks for logging this issue as it will help keep track of the resolution. 🙏

That's a long-standing issue that I hope should be fixed once and for all after implementing the Preference API in TS-Roolkit. It impacts colCount as well but not scrollable/paged since we can update the navigator manually for the latter.

Ideally the Preference API should take care of everything w/o having to trigger anything on the Navigator instance.

@JayPanoz JayPanoz self-assigned this Feb 3, 2025
@HadrienGardeur HadrienGardeur transferred this issue from readium/playground Feb 5, 2025
@HadrienGardeur
Copy link
Member

This should be resolved by readium/playground#64

@JayPanoz
Copy link
Contributor

I can confirm it should be resolved since the Preferences API is messaging hidden frames in addition to the current one to set the properties and have everything in sync immediately. It’s kind of using an aggressive strategy to make sure these styles are committed and applied across the frame pool.

That said, if that’s not the case, please feel free to report it as I’m aware there may be quirks that are harder to anticipate here and there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Draft
Development

No branches or pull requests

3 participants