According to the following


the focus is set to the first occurrence of RichHtmlField no matter it's place with respect to other controls and it causes the page to scroll down if the control is down at the bottom.

How can this behavior be avoided if it is not required to focus on any field when page is loaded using custom page layout.


1 Answer 1


I created a little script to put focus where I wanted it on opening a publishing page in edit mode. The code is:

function waitUnitStuffIsLoaded() {setTimeout(function(){refocus()},1000);}
function refocus(){$("input[Title='Title']").focus();}   
SP.SOD.executeOrDelayUntilScriptLoaded(waitUnitStuffIsLoaded, "sp.ui.spellcheck.js");


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.