DOM element being automatically focused on page load in Employee Center
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 04:27 PM
My Employee Center automatically "focuses" a random DOM element whenever a page loads (see attached video). Support said it was because we have a custom theme so they won't help. The diff between our custom theme and the OOB one is enormous though of course.
Has anyone encountered something like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2024 07:12 PM
since it's a custom one you will have to debug it from your side only
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2024 08:11 PM - edited 12-24-2024 08:12 PM
@CCSF-Syd
There are 2 ways you can identify this:
1. Check the widget code if there's any JS which is automatically focusing the first element.
2. Try doing a code search with classNames or divIds to see any usage of that specific element.
The code is explicitly focusing that element on page load that means there is some javascript making that happen.
Regards
Sajal