Closed Bug 1629263 Opened 4 years ago Closed 3 years ago

When I copy text and paste into Discord it double pastes the text.

Categories

(Core :: DOM: Editor, defect, P2)

75 Branch
defect

Tracking

()

RESOLVED WORKSFORME
Webcompat Priority ?
Tracking Status
firefox76 --- affected
firefox77 --- affected
firefox78 --- affected

People

(Reporter: liqmatrix, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Copied text.

Actual results:

When I paste text into the Discord chat field it doubles pastes. No other browser I use displays this problem. This started recently. Either in this version of Firefox or a recent build.

Expected results:

It should only paste what I copied and not double paste.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Could you provide more information about this problem?

  1. Which OS do you use?
  2. Does the problem only happen when pasting the text into Discord chat field?
  3. Please also provide clear reproducing steps.
    e.g. Where do you copied the text? from a webpage?
    e.g. What Discord app do you use? web version?
Flags: needinfo?(liqmatrix)

Resetting severity to default of --.

I can reproduce on Windows 10 x64, Windows 7 x64, and OpenSUSE Tumbleweed with Wayland.

  • Switch to a different tab.
  • Copy something.
  • Switch to Discord tab. The text field will not have a flashing cursor. Paste.

If you click on the text field or type before pasting, the cursor will start flashing, and pasting will be doubled.

If you paste (two copies appear), then optionally type or click, then undo the double-paste, the cursor will disappear, and pasting will be doubled.

Component: DOM: UI Events & Focus Handling → DOM: Editor

I can reproduce this on Firefox 76 and Nightly on Windows 10.

Severity: normal → --
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

Reproducible on Ubuntu 18.04 with Firefox 77. Works on Chrome.

The content of the clipboard is OK, so the problem is not in the exporting code.

Webcompat Priority: --- → ?

I guess the root of the problem is that the chat element lost focus after switching back to the Discord.com tab.

document.activeElement becomes document.body when losing focus. This neither happens on Chrome.

(In reply to Kagami :saschanaz from comment #7)

document.activeElement becomes document.body when losing focus. This neither happens on Chrome.

So, this sounds the same as this issue https://bugzilla.mozilla.org/show_bug.cgi?id=1545573 ...

Flags: needinfo?(liqmatrix)
See Also: → 1545573

Does this work in Firefox 74? The major focus change, which should have been neutral in the non-Fission config, went into 75.

Other than that, this looks a lot like the bug mentioned in the previous comment.

(In reply to Henri Sivonen (:hsivonen) from comment #9)

Does this work in Firefox 74? The major focus change, which should have been neutral in the non-Fission config, went into 75.

It doesn't work in Firefox 74.

Other than that, this looks a lot like the bug mentioned in the previous comment.

Depends on: 1545573

Does Discord have iframe around the textbox? I can't confirm as they banned my account yesterday.

Discord does not wrap the text box in an iframe. However instead of a regular text field, they use a complex agglomeration of HTML to allow for formatting preview.

If you go to Settings -> Text & Images, and disable "Preview emojis, mentions, and markdown syntax as you type. BETA", then Ctrl+V does nothing the first time you press it.

Priority: -- → P3

confirming this occurs on Firefox 78.0.1, Linux Mint (tricia), in discord, any chat, any server.

I am using a 32 bit machine. Here's an interesting bit of data: If I type any single character then paste, the paste works fine. It's only when the cursor is in the 1st character of the edit/chat box that pasting causes double text to be entered.

(In reply to stehen.seldom from comment #16)

confirming this occurs on Firefox 78.0.1, Linux Mint (tricia), in discord, any chat, any server.

I am using a 32 bit machine. Here's an interesting bit of data: If I type any single character then paste, the paste works fine. It's only when the cursor is in the 1st character position of the edit/chat box that pasting causes double text to be entered.

Priority: P3 → P2

I reported this bug on webcompat but it got closed as worksforme https://github.com/webcompat/web-bugs/issues/54441

to retest and eventually close.

Flags: needinfo?(dschubert)

The preference mentioned in comment 14 is now called "Use slash commands and preview emojis, mentions, and markdown syntax as you type". Pasting into the chatbox works on the first time for me regardless of that prefs value, and I also don't see any double-pasting.

Unfortunately, quite a bit of time went by between reporting this and us looking at this issue - sorry for that. I'll close this, assuming it's fixed now. If it still reproduces, please let us know and - if possible - add reliable Steps-to-Reproduce. :)

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(dschubert)
Resolution: --- → WORKSFORME

moose goose sent me a message to say:

Apparently I no longer have a valid account on bugzilla; I just wanted to comment and say that the bug you want to deprecate no longer exhibits the same behavior on discord 0.0.16.

re: bug 1629263

Thanks.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: