Ex_doc: Searching and clicking on a function in the same page does not close the suggestion box

Created on 26 Dec 2020  路  6Comments  路  Source: elixir-lang/ex_doc

Let' s say you are in doc/elixir/Kernel.SpecialForms.html and in the search box you type in import and you click on "Kernel.SpecialForms.import/2", the suggestion box does not goes away and if you try to hit on x icon, it does not work.

Screenshot shows after clicking the import result, the suggestion box is still there, blocking the view of the menu items.
image

JavaScript Bug

Most helpful comment

Oh, I found a way to reproduce this. If you go to https://hexdocs.pm/elixir/master/Kernel.SpecialForms.html, search, and click, then it's ok. But if you're already on https://hexdocs.pm/elixir/master/Kernel.SpecialForms.html#import/2, search, and click, then it shows the bug. I could only reproduce the bug when clicking, not when pressing "enter" on the suggestion.

All 6 comments

Hi @jonatanklosko, I believe this is related to your jQuery refactoring, can you please take a look?

To reproduce, you can try it here: https://hexdocs.pm/elixir/master/Kernel.SpecialForms.html

Thank you :)

what's your OS/browser? Seems to work fine on macOS/Safari.

Oh, I found a way to reproduce this. If you go to https://hexdocs.pm/elixir/master/Kernel.SpecialForms.html, search, and click, then it's ok. But if you're already on https://hexdocs.pm/elixir/master/Kernel.SpecialForms.html#import/2, search, and click, then it shows the bug. I could only reproduce the bug when clicking, not when pressing "enter" on the suggestion.

On Linux, latest versions Firefox and Chromium have the same buggy behaviour

@wojtekmach I get the same behavior (Ubuntu/Chrome), gonna have a look now!

I'm reopening the issue as there is a little glitch with the implementation in #1311

When you clik and it opens a new tab the suggestion box remains open, but when you try to close it clicking on the x icon, it does not work and the situation is pretty much the same as described in the original issue.

/cc @jonatanklosko

Was this page helpful?
0 / 5 - 0 ratings