Preview has wrong scroll position when an image is inserted



  • Repro:

    1. Paste a link to a suitably large image. Preferably one that fills the whole preview screen.
    2. Type under the image

    Expected: preview jumps to position after the image, letting you see what you type.
    Actual: preview jumps just slightly below the image's top edge, and goes back there when you type anything in the post, even if you scroll to the right position.


    Filed under: somebody probably noticed that already, but oh well


  • FoxDev

    confirmed.

    noticed it months ago but never reported it because... well i'm out of meta.d now. done trying with that discodev.

    looks to be a side effect of the preview trying to helpfully scroll so you're always seeing what you are typing and not taking into consideration image height.

    the effect can also be observed with multiple smaller images, the preview will eventually get far enough out of sync that you can't see your text anymore.


  • Winner of the 2016 Presidential Election

    I think we caused that by complaining about the fact that youtube-videos in preview would reload every keystroke.

    Filed Under: probably still fixable but meh



  • I could have sworn this was among the first bugs discovered. Or maybe I'm thinking of one of the other five thousand preview bugs.



  • I pretty sure you're right.



  • @Kuro said:

    I think we caused that by complaining about the fact that youtube-videos in preview would reload every keystroke.

    Remember the first broken shitty implementation of the preview text wouldn't scroll at all. Because the morons wanted to make some kind of really "smart" code that would cause the preview window to keep the insertion point centered or some shit, but they couldn't get it to work.

    They fixed it by implementing my suggested lazy-solution, just "element.scrollTop(0,999999999)" occasionally. Which admittedly was lame, but at least it made the preview window good for something instead of utterly useless.

    Apparently they've gone back to the "smart" solution which, SHOCK AND SURPRISE! still does not work at all.


Log in to reply