
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 07:08 AM
Does anyone know how to prevent field focus from being set on the 'Go to' search at the top of a table list view (as found on a page like /incident_list.do)? Release version is Helsinki.
The focus being set is causing usability issues for client with field service workers using tablet devices because when they pull up a list, the focus is set in the search field which then summons the tablet keyboard interface thereby blocking the records in the list.
The offending 'Go to' Search html element is:
<input style="width: 150px;" placeholder="Search" class="form-control" name="d49f048c0ffba20051729bd692050e5e_text"
id="d49f048c0ffba20051729bd692050e5e_text">
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);
}
This didn't work; 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.
Any pointers or ideas would be much appreciated; thank you!
Solved! Go to Solution.
- Labels:
-
Now Mobile

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 12:12 PM
A UI Script to blur any initial focus 100% solved the described 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 07:15 AM
I did this in a record producer so that it would focus the field I wanted:
function onLoad() {
//Force focus on a field
setTimeout("var refocus = g_form.getElement('<field name here>');refocus.focus();",0);
}
Hope this is helpful!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 07:18 AM
I tried something similar, but Client Scripts don't work on table list views.
Edit: BTW, that does work on a form to set the focus on a different field, but it does not work on the table list view. Thanks for the tip!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 12:12 PM
A UI Script to blur any initial focus 100% solved the described 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.