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

Consistency problems with applying highlights and annotations #12

Open
mohshomis opened this issue Dec 4, 2024 · 1 comment
Open

Consistency problems with applying highlights and annotations #12

mohshomis opened this issue Dec 4, 2024 · 1 comment

Comments

@mohshomis
Copy link
Collaborator

see title

@mohshomis
Copy link
Collaborator Author

My annotation extension works fine on my laptop but struggles on others—highlights and annotations either fail or don't apply correctly. It seems the XPath expressions aren't saved or applied properly across devices.

Possible Causes:

DOM Differences: Webpages might render differently on other devices, making XPaths inaccurate.
Dynamic Content: Content loading after annotations are saved could break XPaths.
Browser Variations: Different browser versions or settings may handle XPaths differently.
Text Node Issues: Variations in text node processing could cause mismatches.
Potential Fixes:

Use unique attributes instead of positional XPaths.
Try data attributes or CSS selectors for reliability.
Handle DOM changes dynamically with MutationObservers.
Improve how text selection is serialized for consistency.
Add better logging to pinpoint failures.

Next Step:
Set up an environment that mimics the failing devices to debug and test effectively. I need hands-on access to replicate the issue, not just feedback from others.

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

No branches or pull requests

1 participant