Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Highlight matches within the page #23

Open
Elchi3 opened this issue Jul 13, 2017 · 3 comments
Open

Highlight matches within the page #23

Elchi3 opened this issue Jul 13, 2017 · 3 comments

Comments

@Elchi3
Copy link
Member

Elchi3 commented Jul 13, 2017

Original issue: Elchi3/mdn-doc-tests#49

It should be possible to somehow highlight the part of the page related to an error.

E.g. this could happen when hovering the match or by clicking an icon next to it. The matched part should then be scrolled to and highlighted like Firebug's or the DevTools' inspector does it.

Sebastian

@MatonAnthony
Copy link
Collaborator

MatonAnthony commented Jul 18, 2017

Following our meeting Monday, the Selection API has been talked about.

@MatonAnthony
Copy link
Collaborator

MatonAnthony commented Jul 24, 2017

I investigated further with the Selection API and I'm not satisfied with the "solution" it offer.

Pros:

  • I can select something

Cons:

  • I override current selection if there is one.
  • Selection is lost when you click somewhere else
  • Selection is lost on keystrokes inside the textarea

@SebastianZ
Copy link

I would rather say that this should be done via a highlighter mechanism similar to the one the DevTools are using, i.e. add an absolutely positioned <div> (or maybe even an SVG) as an overlay.

Sebastian

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

No branches or pull requests

3 participants