How to prevent field focus from being set on the 'Go to' search at the top of a table list view

Version 1

    The Issue:

    If you've ever used a tablet with the ServiceNow desktop interface, you might find a pretty annoying behavior when you go to a table list view, such as /incident_list.do . After the page loads, the keyboard interface for the tablet will automatically jump into the screen thereby blocking the records in the list because document focus has been set in the 'Go to' search at the top of the list.

     

    Field focus is set in the 'Go to' Search input field.

     

    Required Solution:

    I wanted to remove, or 'blur' the focus to stop the keyboard from interfering with the tablet users' experience.

     

    Things I've tried:

    1. Blurring the element to take away its focus via a Client Script:

    function onLoad() {
         setTimeout("var reblur = document.getElementById('3e57fbf70feba20051729bd692050e36_text');reblur.blur();",5);
    }
    


    Didn't work
    ;I remembered Client Scripts do not work on table list views.

     

    2. Set system property 'glide.ui.focus_first_element' to false, but this only stops first element focus on the form view; didn't work.

     

    Solution:

    Make a UI Script to blur any initial focus! It 100% solved the issue.

    addLateLoadEvent( function() {
    document.activeElement.blur();
    });
    


    Note
    : This will stop ALL initial focus on EVERY page in the instance so you may want to put conditions on this.

     

     

     

    This document was generated from the following discussion: How to prevent field focus from being set on the 'Go to' search at the top of a table list view