7
$\begingroup$

So this is what happens:

You have a really long answer to puzzle and have finished writing the draft. You go down to click one of the spoiler tags to see if they are working, but what happens is that you get sent back up to the page where your intersection point/cursor is on your draft writing box. Astonished, you click outside of the box so you are no longer typing anymore, and try again, but you still get sent up to the top. After scrolling down, you see that the spoiler was opened.

This is really annoying when you have long answers and have to waste time to scroll back down everytime. For shorter answers, its not really a problem, but specifically on Puzzling we make really complex puzzles that require long answers. Its just a pain in a neck...

Is this something that can be fixed as it wastes valueable time?

$\endgroup$
9
  • $\begingroup$ It has been like that for quite some time. I just work without spoilers and then manually spoiler them at the end. (That said, I'm used to most of the quirks and workarounds of spoiler formatting already.) $\endgroup$
    – Bubbler
    Sep 17, 2021 at 8:30
  • 1
    $\begingroup$ Oh. Thought was a bug cause thats what happens. But can it be fixed? $\endgroup$
    – Stevo
    Sep 17, 2021 at 8:35
  • 1
    $\begingroup$ One possible improvement could be to have a tick box near the edit textbox that contols whether spoilers in the preview should be revealed (which would be useful for editing) or hidden (as they would appear in the post). $\endgroup$
    – M Oehm
    Sep 17, 2021 at 9:11
  • 1
    $\begingroup$ I think this started happening at the same time as they changed the behaviour of the spoiler tags from "show content when hovered over" to "show content when clicked". I agree that it's really annoying. It's definitely not Puzzling-specific. $\endgroup$
    – Gareth McCaughan Mod
    Sep 17, 2021 at 10:10
  • $\begingroup$ A bit of experimenting suggests that maybe it happens when editing a new answer but not when editing one you've already written? If this is right, then one option is to save an initial version without spoilered stuff in and then edit it in. But this will likely annoy some people who will see it as an attempt to stake a claim at having the first answer prematurely by posting your answer before you've finished writing it up... $\endgroup$
    – Gareth McCaughan Mod
    Sep 17, 2021 at 10:22
  • 1
    $\begingroup$ I've posted on main meta about this: meta.stackexchange.com/questions/369946/… $\endgroup$
    – Gareth McCaughan Mod
    Sep 17, 2021 at 10:27
  • $\begingroup$ @GarethMcCaughan no. It happens also while editing any answers as well. Asking an answer as well. For questions, we don't really use spoilers, so I don't know about that. $\endgroup$
    – Stevo
    Sep 17, 2021 at 22:54
  • $\begingroup$ I tried some experiments and didn't get it to happen while editing answers, but maybe somehow I did something different in that case from when I created new answers, or something? $\endgroup$
    – Gareth McCaughan Mod
    Sep 17, 2021 at 22:58
  • 1
    $\begingroup$ It only scrolls back up when the markdown editing box is not visible. If the cursor is visible when you click a spoiler, it doesn't move up. Only when you cant' see the typing cursor then... zoom you go up to the top of the page $\endgroup$
    – Stevo
    Sep 17, 2021 at 22:59

2 Answers 2

3
$\begingroup$

This isn't worthy of acceptance as an answer, because it's a workaround rather than indication of whether the bug is actually going to be fixed. But:

Over at https://meta.stackexchange.com/a/376468/361413, one "Niko O" has answered the question I asked about this on main meta, pointing out the following trick:

If instead of just clicking on "Reveal spoiler", you attempt to select a bit of that text, then the spoiler-hidden material gets revealed but the jump-to-the-edit-box doesn't happen!

Apparently this is because the code handling this doesn't do the jump thing if there's any text selected. Maybe there's a good reason for this, or at least as good a reason as there can be given that the whole "feature" is horrible, but I can't think what the reason might be -- but never mind, it works. :-)

(In comments on that question, someone did find an explanation for why the horrible thing happens. Back in 2009 someone complained that they kept accidentally clicking on the preview text and expecting to be able to edit it, and someone else said "why not make it so that clicking on the preview text takes you to the edit box where you can edit it?", and Jeff Atwood decided to implement that "as a temporary workaround". That temporary workaround has been there for a little over 12 years now. This history doesn't make it any more obvious to me why if you wanted that behaviour you'd not want it when something is selected. I guess maybe the idea is that that means you've already interacted with the preview text so you must know it isn't the edit box, or something?)

$\endgroup$
2
  • $\begingroup$ "why not make it so that clicking on the preview text takes you to the edit box where you can edit it?". Because it causes far too many problems. E.g. sometimes I scroll through a long item a little too enthusiastically and accidentally depress the scroll wheel. This causes arbitrary text to be pasted into a random location within my answer. I'm very unlikely to notice it until much later, especially if it's only a few characters. $\endgroup$ May 29, 2022 at 13:32
  • $\begingroup$ For the avoidance of doubt, I completely agree that it makes things worse rather than better. I was just quoting the original suggestion that led to the unpleasant situation reported here. $\endgroup$
    – Gareth McCaughan Mod
    May 29, 2022 at 14:49
0
$\begingroup$

The selection trick offered in Niko O's answer works on my Firefox browser v110.0, however somehow not on my Cent Browser v5.0.

So, I wrote a simple userscript to disable this auto-scrolling completely, which should work on all modern browsers. You need to install an extension such as Tampermonkey or Violentmonkey to install it.

Install on GreasyFork

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .