Skip to content
  • Felipe Borges's avatar
    wizard-window: Grab focus only once in "Download an OS" search · 4122912e
    Felipe Borges authored
    We provide some sort of "type-ahead" search in the "Download an OS"
    page, where users can just type any letter in their keyboard and that
    will perform a search in the available OSes for Download.
    
    When a new key is pressed, the key-press-event handler was constantly
    calling downloads_search.grab_focus (), which makes the GtkSearchEntry
    select its text, causing any following key presses to overwrite the
    existing ones.
    
    The solution to this issue is to only grab_focus () the search
    entry when it doesn't have focus yet. In other words:
    
    if (!downloads_search.has_focus) {
        downloads_search.grab_focus ();
    }
    
    Fixes #357
    4122912e