Keep focus on search box after hitting return

Issue #211 closed
Robert Leach created an issue

Hitting return in the search box (the first time) results in the focus (i.e. the blue highlight) to shift to the zoom selection button. I think that if hitting return in a search box, focus should either remain there or at the least, transfer to the companion search box.

Comments (12)

  1. Robert Leach reporter

    Resolves issue #211 - search box should retain focus after search.

    I tried using isFocusOwner() on the searchTermBox's text field, but it always returned false for some reason. I'm not sure why that was, so I simply set a boolean at the beginning and end of the search process (in seekAll()) that DendroController can check before requesting that one of the zoom buttons gets focus. This allows us to to change focus to the zoom button when either of the search term boxes has focus.

    If anyone figures out how to properly check the search term box's focus status, we should improve this solution.

    → <<cset e7c4cd99da9b>>

  2. Robert Leach reporter

    Resolves issue #211 - search box should retain focus after search.

    I tried using isFocusOwner() on the searchTermBox's text field, but it always returned false for some reason. I'm not sure why that was, so I simply set a boolean at the beginning and end of the search process (in seekAll()) that DendroController can check before requesting that one of the zoom buttons gets focus. This allows us to to change focus to the zoom button when either of the search term boxes has focus.

    If anyone figures out how to properly check the search term box's focus status, we should improve this solution.

    → <<cset e7c4cd99da9b>>

  3. Robert Leach reporter
    • changed status to open

    The merge with Chris's branch broke this functionality. I think I have a mitigating fix working, but it breaks the ability to navigate with the keyboard.

  4. Log in to comment