cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Stopping IE field focus on page load

Jump to solution

I have a form part way down a page, and when viewing the page in Internet Explorer, it causes the page to scroll down to my form upon pageload.  Can someone help me with the code to prevent the page from scrolling down to the first form field after page load? It only occurs in IE. Not Chrome.

Labels: (1)
Reply
6 Replies
Workflow Hero

Re: Stopping IE field focus on page load

Jump to solution

You can use the Javascript method .focus();

0 Kudos
Reply
Workflow Hero

Re: Stopping IE field focus on page load

Jump to solution

I have, and it didn't seem to be working but might have been a cache issue. 

I think this code is working for me, using a script editor to place it on the page.

$( document ).ready(function() {  $("pageTitle").focus();});
0 Kudos
Reply
Workflow Hero

Re: Stopping IE field focus on page load

Jump to solution

Hi Corbett,

Try replacing your code in NWF.FormFiller.Events.RegisterAfterReady instead $(document).ready(), for more details about this event, please refer this link.

Thank you.

0 Kudos
Reply
Workflow Hero

Re: Stopping IE field focus on page load

Jump to solution

Thank you.  I am now using: 

NWF.FormFiller.Events.RegisterAfterReady(function () { NWF$('.nf-associated-control').blur(); });

Seems to be working...

0 Kudos
Reply
Workflow Hero

Re: Stopping IE field focus on page load

Jump to solution

Glad to hear that it is working, please mark it as "answered" if it resolves your issue, so that it would be useful for other community users.

0 Kudos
Reply
Workflow Hero

Re: Stopping IE field focus on page load

Jump to solution

I am also facing the same issue, but unable to prevent the auto scroll to the first field using the above approach.

Is their any other way to achieve it

0 Kudos
Reply