Emojii's leap to the bottom

AI-generated summary

A bug has been reported in the discussion “Emojii’s leap to the bottom”. When editing a post, selecting an emoji using the mouse causes the screen to jump to the bottom of the post. MichelleBasey has reproduced the issue on multiple sites, including try.discourse.org. The issue only occurs when the text is taller than the viewable editing window and the emoji is selected with the mouse. awesomerobot has also reproduced the issue on meta and shared a video of the problem. joffreyjaffeux discovered that the issue only occurs when clicking on the emoji with the mouse, not when selecting with the Enter key. A fix has been proposed in a GitHub pull request.

STEPS:

  1. open editor window (via reply or New Topic)

  2. create several lines of text until it’s longer than the visible window height

  3. scroll back up so the end isn’t visible

  4. click somewhere in the visible text and type “:” to begin the emojii process

  5. select one (either in the immediate list or from the “more …” list)

RESULT:
The screen pops down to the end.

MORE DATA
The blinky cursor stays where you were typing. You are just no longer seeing that part of the post anymore.

This problem started recently (like past couple weeks maybe?).

The problem was just confirmed on a completely different OS and browser. (so fairly confident it’s not “just me and my weird computer world”)

I know, I know, the “real” solution is to stop adding emojii’s while editing a post. LOL

:star2:

Hi,

no repro with your steps for me. Can you repro on try.discourse.org please ?

I am reproducing it on try.discourse.org.

I was also reproducing it on
party.michellebasey.com (still in Trial land)
community.sethgodinfanclub.com
and 2 of Seth’s workshops
:sunny:
hmm …

It doesn’t happen unless the text is taller than the viewable editing window.

If I type
adf
adf
adf
adf
adf
adf
adfa
dsfa
sdfasdfdsfa
enough times to get a scroll bar

then use my mouse rolly wheel to go back toward the top, then type : and select an emojii … that’s when it happens

if I fully type the name of the emojii, all is well

hmmm …

I can repro here on meta

I’m seeing it with @ as well, (hopefully a “shared code” kind of problem).

Ok finally got why I wasn’t getting a repro, it only “works” if you click on emoji with the mouse, not when you select with Enter

Investigating…

This should be fixed by:

https://github.com/discourse/discourse/pull/6942

Note: we should really move mention autocompletion stuff from composer-editor to d-editor. It’s kind of unexpected, emojis and categories are in d-editor and mentions in composer-editor