Skip to content

Commit

Permalink
fix: overhaul text lookup
Browse files Browse the repository at this point in the history
Completely overhaul text lookup to cover more cases and (hopefully) be
easier to extend in future (so we can tackle #1130).

Fixes #990.
Fixes #1033.

Also improves performance and allows looking up `user-select: all` text
in Firefox.
  • Loading branch information
birtles committed Apr 17, 2023
1 parent bcd62cf commit 34db842
Show file tree
Hide file tree
Showing 9 changed files with 1,121 additions and 822 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ app.

## [Unreleased]

- Rewrote text lookup to better handle cases of hidden content (including
`user-select: all` content), avoid lingering popups, and improve performance
(Fixes [#990](https://github.com/birchill/10ten-ja-reader/issues/990) and
[#1033](https://github.com/birchill/10ten-ja-reader/issues/1033)).
- (Chrome, Edge, Safari) Fixed a bug where overlays would be broken on
[MangaDex](https://mangadex.org/)
([#1110](https://github.com/birchill/10ten-ja-reader/issues/1110)).
Expand Down
2 changes: 1 addition & 1 deletion src/content/gdocs-canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HighlightStyle } from '../common/content-config-params';
import { empty, SVG_NS } from '../utils/dom-utils';
import { Point, Rect } from '../utils/geometry';

import { CursorPosition } from './get-text';
import { CursorPosition } from './get-cursor-position';

export function injectGdocsStyles() {
removeGdocsStyles();
Expand Down
Loading

0 comments on commit 34db842

Please sign in to comment.