Highlightning doesn't work with iframes on Chrome
peace2000 opened this issue · 6 comments
Describe the bug
If a page uses internal iframe (not sure how it works with external iframes), no content will be highlighted in the whole page. This only occurs on Chrome. Firefox doesn't have this issue.
Steps To Reproduce
Steps to reproduce the behavior:
- Open https://www.w3schools.com/html/tryit.asp?filename=tryhtml_iframe_height_width_css
- Make a rule to highlight "You can"
- "You can" won't be highlighted on the right side of the page, only on the left side. Firefox has no issues, Chrome has. Doesn't work even if I enable "Every page" -mode.
Chrome:
Expected behavior
AH should highlight text on Chrome also on iframe-enabled pages. The right side should get highlighted.
Device info:
- operating system: Win 10
- Browser and version: Chrome 105.0.5195.127
- ScrollAnywhere version: None
Additional info
I experienced this bug in a private, ServiceNOW based website so I cannot give a link to that. I could not find a sample page on a public web that uses similar internal iframe as well so I linked to w3schools.com that "artificially" reproduces this issue. Hopefully it's ok this way, the demo page link reproduces the issue exactly in the same way as in the page I'm using.
Thanks for reporting!
It seems I have a bug in the injection code in Chrome. It's using a different API and it looks like I'm not targeting correct frame...
I will try to fix this by the end of this week, (maybe even today if I still have enough strength when I get home).
So, I've fixed something... but something else is still broken :).
The page has 3 frames, 1 main page, 2 the right part and 3 the nested iframe in the right part.
Somehow, Chrome doesn't send me event for the second one... maybe because it doesn't have a "src" attribute? I have to say I'm surprised that's a thing :).
In any case, new 4.6 version fixes highlights in normal iframes, like the nested one, so it should help in most cases. Let me know if it helped you as well.
Chrome and Edge versions are being reviewed now.
Cool! Thanks again, after the new version becomes available, I'll inform what happened with the site I'm using this with.
New version is available now, I hope it helps :)
Hi, I noticed and already tested, this seemed to work for me, but I'd also want another person to confirm this. I'll notify when he checks this as well.
Hi, got confirmation that it also works for another person. Thanks!
I do agree that this will fix it for most of the cases. Good work!