Code review comment for lp:~uriboni/webbrowser-app/keyboard-navigation

Revision history for this message
Ugo Riboni (uriboni) wrote :

> - If the address bar is empty and focused (e.g. when opening a new blank
> tab), pressing the down arrow key removes focus from it, and pressing the up
> arrow key doesn’t restore it.

This was fixed by making sure we can move to the suggestions list with Down only if there are actually items in it.

> - If I type a word in the address bar and wait for search suggestions to
> appear, then press the down arrow key to navigate the suggestions list, the
> search suggestions disappear.

This was more tricky than how you described it. It happened only if the only suggestions in the list were from the search engine. If there were history or bookmarks in the list it did not happen.

The cause was the fact that the search engine suggestions model would be disabled (therefore reducing the count of suggestion to zero and closing the list) when the chrome did not have the focus, but did not take into account the case when the suggestion list itself had focus.

> - If I focus the address bar, then open the drawer menu with the mouse and
> open the history view from there, it cannot be dismissed with ESC (it works as
> expected if the address bar wasn’t focused or if the view was opened with
> Ctrl+H).

Wasn't giving focus to the history page when activating from menu.

Note: I added a test case to prevent the first issue from re-occurring, but I have no idea how to test for the other two, as the tests would need to verify that *eventually* something does not happen, which is hard to do without using arbitrary waits that make the tests fragile.

« Back to merge proposal