element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.15k stars 1.99k forks source link

Message Editor pills only showing trailing `:` #10508

Open rekkisomo opened 5 years ago

rekkisomo commented 5 years ago

Description

When mentioning a room or user, the pill in the Message Editor does not show, and only shows the trailing :. Started happening out of nowhere.

Steps to reproduce

N/A

Describe how what happens differs from what you expected.

Instead of showing a user pill in the editor, it only shows a :. It also does not show pills in chat, an instead a blue link showing the username. Checked console, nothing shows up (even verbose) about the message editor or pills.

If it helps, backspacing the trailing space as well as the : reveals that the pill is technically there, as the placeholder for the message editor doesn't show until another backspace happens. When inspecting element, this shows:

<p data-key="55">
    <span data-key="56">
        <span data-offset-key="56:0">
            <span data-slate-zero-width="z">&#65279;</span>
        </span>
    </span>
    <span data-slate-void="true" data-key="60" contenteditable="false">
        <span data-slate-spacer="true" style="height: 0px; color: transparent; outline: none; position: absolute;">
            <span data-key="62">
                <span data-offset-key="62:0">
                    <span data-slate-zero-width="z">&#65279;</span>
                </span>
            </span>
        </span>
        <span contenteditable="false">
            <a href="https://[riot self-host url]/#/@danteotter:[...]" data-key="60"></a>
        </span>
    </span>
    <span data-key="61">
        <span data-offset-key="61:0">: </span>
    </span>
</p>

When mentioning a user image

When message sends (if this error is important, hard to tell as it doesn't happen all the time.) image image

When sending a message containing @room (which does embed a pill to the Message Editor), vs mentioning a channel (which doesn't show anything, only a space) image

Logs being sent: no

Version information

For the web app:

bwindels commented 5 years ago

@rekkisomo How do you try to mention a user? By typing @name or Name in the composer? Or clicking on a name in the timeline? Or clicking on Mention in the user panel?

Removed the new-composer label as it doesn't seem related to that. It might be related to some refactoring wrt to pills to make them usable in the Edit history dialog though.

rekkisomo commented 5 years ago

It happens on any method of mentioning a user (@name in editor, clicking username in chat, etc.)