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

A div node is removed completely (not just suppressed) even with no CSS applied #439

Open
jensolafkoch opened this issue Jun 2, 2024 · 8 comments
Labels

Comments

@jensolafkoch
Copy link

Describe the bug

In a page (it is one behind a paywall, German SPIEGEL magazine) there is the following node:

<div data-sara-click-el="body_element" data-area="text" data-pos="56">
<section class="RichText RichText--highlight lg:w-8/12 md:w-10/12 lg:mx-auto md:mx-auto lg:px-24 md:px-24 sm:px-16 break-words word-wrap">
<p><strong>SPIEGEL</strong>: Sehen Sie das nicht etwas zu romantisch? <a rel="noopener noreferrer" target="_blank" href="https://www.spiegel.de/kultur/tv/michaela-may-gisela-schneeberger-und-jutta-speidel-keine-lust-auf-omarollen-a-ceb622f1-d33b-4771-93e3-6e461587bd60">Ältere Frauen beklagen sich heute eher darüber, dass sie unsichtbar sind </a>und von der Gesellschaft ausgemustert werden, nicht über eine allzu hohe Nachfrage nach ihrer Lebensweisheit.</p>
</section>
</div>

This div gets completely removed (missing in Inspector view) by Just read as long as the inner tag is present. This is true even with no css applied at all ("empty" theme). Without tag it does work.

To Reproduce
n/a

Expected behavior
Node should not be removed.

Screenshots
n/a
Please complete the following information:

  • OS: latest Windows 11
  • Browser: latest Firefox dev version
  • Version 127.0b9
@ZachSaucier
Copy link
Owner

Hey Jens, thanks for reaching out.

I'm not seeing anything in Just Read's code that should delete this element... When I try to create a minimal demo it doesn't remove the text in the Just Read view for me. Does it for you?

Do you have any custom domain selectors (the part at the bottom of the Just Read options page) set up?

Additionally, if you can save the page as a .html file and share it with me then I can try to test it that way. You can do that through right clicking then clicking "Save as". Or maybe right clicking, clicking "View Page Source" and copying that over to a file and sharing it.

@jensolafkoch
Copy link
Author

jensolafkoch commented Jun 2, 2024 via email

@ZachSaucier
Copy link
Owner

Thanks! I can recreate the issue using the file you sent: https://zachsaucier.com/test.htm

After spending a few minutes, I'm not immediately seeing an issue or even a difference with other sections. I'll come back to then when I'm less tired.

@ZachSaucier
Copy link
Owner

After investigation it is because it is being stripped by Readability.js: the new way of auto-selection that Just Read uses.

After going to their GitHub to ask, I found this: mozilla/readability#872

@jensolafkoch
Copy link
Author

So probably a bug in Readibility.js? In fact the removed node resembles a lot of other nodes, I hope they will find something :-)

@ZachSaucier
Copy link
Owner

ZachSaucier commented Jun 4, 2024

Yeah.

It's part of the downside of using a third party tool: you inherit some of their bugs

@ZachSaucier
Copy link
Owner

Looks like it's actually this bug: mozilla/readability#776

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

No branches or pull requests

2 participants