texthighlighter icon indicating copy to clipboard operation
texthighlighter copied to clipboard

Page is hanging when I try to highlight text

Open techiexplorer opened this issue 4 years ago • 3 comments

This issue is:

  • [ ] Bug report
  • [ ] Feature request
  • [ ] Improvement

Actual behaviour

Page is hanging when I try to highlight text

Expected behaviour

Text should be highlighted

Steps to reproduce

new TextHighlighter(elem, { color: "red" });

Screenshots

Logs

  • attach export from options screen. Can replace urls and repo names used.

Configuration

PopOS (Linux), Latest chrome browser - Version 88.0.4324.150 (Official Build) (64-bit)

  • OS:
  • Browser:
  • Browser version:

techiexplorer avatar Feb 14 '21 09:02 techiexplorer

@techie-explorer there is not enough information to help with this? what's the html code? more information on the javascript being used.

lastlink avatar Aug 09 '21 14:08 lastlink

I encountered really bad hanging issues in iOS (from several minutes all the way to full app crash).

Mine would always freeze when an image was included in the highlight.

I mostly fixed it by changing the keepRange boolean in doHighlight to false. Now it only occasionally freezes when highlights include an image.

I don't understand the mechanism for why this happens, but hopefully it can shed light on any other issues people might be having.

jeffreybiles avatar Sep 25 '21 16:09 jeffreybiles

mobile highlighting doesn't work well in browser. it's better on native apps. However, this plugin does work for mobile in a limited extend. You have to use on touch rather than keydown.

lastlink avatar Jul 19 '24 21:07 lastlink