readthedocs / addons

JavaScript client to integrate with Read the Docs nicely
https://readthedocs-addons.readthedocs.io/
MIT License
22 stars 6 forks source link

Fix search selectNextResult behaviour #352

Closed zanderle closed 3 months ago

zanderle commented 4 months ago

I decided to fix it by changing the logic of selectNextResult. I hope that's ok. It was relying on the ids being set correctly, which felt very unreliable and flaky. I was looking through git history but couldn't find good reasoning behind that logic. So I instead made it rely just on the order in which they are present in the document. That felt closer to what we actually want it to do.

Let me know if you'd rather we keep the original logic.

Fixes #316