nolanlawson / pokedex.org

Offline-capable Pokédex web site (unmaintained)
https://www.pokedex.org
Apache License 2.0
2.27k stars 325 forks source link

Find (Ctrl+F) is broken #67

Closed sundarj closed 7 years ago

sundarj commented 7 years ago

I understand that only Pokémon that are within a certain boundary of the viewport are rendered for perfomance purposes - however, this means that you cannot use Find to search for the ones that happen to be unloaded (which I would expect to work since it's a single page of results).

There are two ways I see to fix this:

  1. Override Ctrl+F to focus the search bar (but don't override it when there is a Pokémon open)
  2. Rather than completely unloading Pokémon that are outside the viewport, render a minimal version (such as just the name)
nolanlawson commented 7 years ago

This is kind of why I added the search bar... I didn't expect Ctrl-F to work because of the virtualized list. Sadly the virtualized list really helps performance on mobile devices.

sundarj commented 7 years ago

Yeah, figured as much; I don't know about other people, but I'm so accustomed to hitting Ctrl-F to find text on a single page it's a little jarring that it doesn't work. Is the second option a no-go then (having just <li>Pikachu</li><li>Gyrados</li>... outside the viewport)?

EDIT: nevermind, just realised that this wouldn't work too well since you'd have to respond to the focus from Find somehow...