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
RichardR1RichardR1 

Script is disabling inline editing in Visualforce

Newbie dev here. Does anyone know why inline editing was disabled when I added the script below? The only reason I added it is because every time the page loads, the cursor moves to a specific field in the page, even though that was not last position of the cursor
 
<script>
    window.onload = function(){
        window.scrollTo(0,0);
    };
</script>

Not sure if you wanna see my Visualforce page since it's so long. I realize there is a similar question but it was not enough for me to resolve the issue.
SwethaSwetha (Salesforce Developers) 
Hi Richard,
I see you also reached out on https://salesforce.stackexchange.com/questions/354180/script-is-disabling-inline-editing-in-visualforce which was addressed by sfdcfox.

Please consider marking this answer as best to close the thread. Others facing the same issue will find this information useful. Thank you
RichardR1RichardR1
Hi Swetha, unfortunately my problem is not solved, maybe I'm missing some step from the answer
Dushyant SonwarDushyant Sonwar
HI Richard,

can you post the screenshot of (Ctrl + Shift +I ) inspect element? There can be the reason for your issue. Also, Is this happening in lightning or classic?
 
Dushyant SonwarDushyant Sonwar
Your javascript might be failing due to some reason.
RichardR1RichardR1
@dushyant it's in classic. Attached the requested screenshot.
User-added image
Dushyant SonwarDushyant Sonwar
Richard ,

Apologies for the late reply, i didn't get the notification. Can you post the screenshot of the console tab? Right now it is image of elements tab
RichardR1RichardR1
Dushyant, sorry for the delay, I went to a different path but went back to this issue.
User-added image