
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-16-2016 12:28 PM
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.
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
- 1,353 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Joe:
I would like to see an update on this article!
Steven.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Joe,
UI script working perfectly. Is it possible to change the focus on other field like List control instead of search. PFA.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Joe,
I found solution for my above problem.
We can write below script in UI Script.