Bug 1817208 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Daisuke Akatsuka (:daisuke) from comment #3)
> (In reply to Marco Bonardo [:mak] from comment #2)
> > Another case is typing a search, pressing ESC to close the results panel, then confirm the search with Enter, should return `input_field` as selected_result, instead it returns `unknown`.
> 
> I also could reproduce this as well.
> It seems that the reason is that even if we close the results by ESC, the `view.visibleResults` still remain. So, we may need to check `view.isOpen` first here.
> https://searchfox.org/mozilla-central/rev/cd2121e7d83af1b421c95e8c923db70e692dab5f/browser/components/urlbar/UrlbarController.sys.mjs#1096

Ah, no, it is not so simple. Since the results will be closed before here in most cases.
(In reply to Daisuke Akatsuka (:daisuke) from comment #3)
> (In reply to Marco Bonardo [:mak] from comment #2)
> > Another case is typing a search, pressing ESC to close the results panel, then confirm the search with Enter, should return `input_field` as selected_result, instead it returns `unknown`.
> 
> I also could reproduce this as well.
> It seems that the reason is that even if we close the results by ESC, the `view.visibleResults` still remain. So, we may need to check `view.isOpen` first here.
> https://searchfox.org/mozilla-central/rev/cd2121e7d83af1b421c95e8c923db70e692dab5f/browser/components/urlbar/UrlbarController.sys.mjs#1096

Ah, no, it is not so simple. Since the results will be closed before here in most cases.
Perhaps, we may need to reset `visibleResults` when closing by ESC.

Back to Bug 1817208 Comment 4