1

When I edit a new question or answer, if I insert a code snippet and then I click on Run code snippet blue button, to check if it works as expected, I noticed that such an action triggers a wrong behavior when it, the textarea itself, is not into view: the editable <textarea> with the post that I'm editing is focused and scrolled down and brought into view, preventing me to see how my code snippet works once it is executed.

So I have to scroll down again to see it. I don't think this is a wanted behavior most of the time, especially with long posts. Such a behavior in fact becomes tedious, especially when writing very long and complex posts because we have to scroll even more. As users in fact we have to check multiple times if the snippet works as expected scrolling up and down a lot of times.

Such a problem is happening too when in edit mode only. When the post has been saved and I am in view mode, it doesn't happen and works fine as expected: the snippet is executed with no unwanted scrolling of the page.

I don't know if other web sites of the Stack Exchange group has the same problem. Is it worth a check?

Can this behaviour be removed?

snippet example here
if in edit mode, if I click on Run code snippet, down here the page scrolls up on its own and I have to scroll down manually to see how the snipped works.

2
  • Unable to reproduce in Chrome, went into edit mode on this question and made a change to the snippet source, clicked run and no scrolling was triggered. Commented Sep 7, 2022 at 22:30
  • 1
    Yeah, it's horrible. It makes no sense to scroll to the top of the page whenever anything in the preview is clicked. Commented Sep 7, 2022 at 23:15

0

Browse other questions tagged .