function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sharp BESharp BE 

Disable automatic selecting first field in Visualforce page

Hi all,

We are currently preparing our live org to do the full transistion to Lightning. 
Thereby I'm currently exploring if all the current functions we have in place in Classic are also functioning in Lightning. 

Now I came with a issue that we have with an embedded VisualForce page which is integrated in the record page of custom object. As I'm opening the details of that record page my cursos will automaticly jump to the first cell which is presented in the VisualForce page. The annoying on this issues is that this visualforce page is at the very bottom of each page and thereby scrolls down each time we are opening it. 

Is there someone who knows a solutions for this kind of issue, that openining the record page won't trigger the cursor to go straight to the first cell?

Thanks! 
Best Answer chosen by Sharp BE
Sharp BESharp BE
We have solved this issue with adding the following script in the Visualforce page. 
 
<script>function setFocusOnLoad() {}</script>