element-web: Pasting text into composer is buggy with Firefox when dom.event.clipboardevents.enabled is disabled

Description

Pasting into the editor if not at beginning of a message makes it look like the message was composed correctly, but upon sending, the pasted text is not sent.

Steps to reproduce

  • Disable dom.event.clipboardevents.enabled in about:config
  • Click on editor
  • Type <space> in editor
  • Type <ctrl-v> (assuming some text in clipboard)

Version information

  • Platform: web

For the web app:

  • Browser: Firefox 61.0
  • OS: Void linux
  • URL: riot.im/develop

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 34 (9 by maintainers)

Most upvoted comments

@dms-cat Another option is to use https://addons.mozilla.org/en-US/firefox/addon/don-t-fuck-with-paste/ which should let you choose to only block those events on certain sites rather than disabling a fairly important feature across all sites. (yes I am the maintainer of that add-on on Firefox, but I’m also part of the matrix community)

This issue is caused by disabling dom.event.clipboardevents.enabled in about:config, which is a useful configuration change to enable pasting text (especially passwords) on sites which don’t allow it.

The workaround is to simply flip the value of dom.event.clipboardevents.enabled to true (the default), but Riot should support pasting when this feature is disabled to avoid breaking this quality of life hack on other sites.

Hi, I’m experiencing exactly the same problem with riot in Firefox for some months now, making pasting virtually impossible for me. I’m on Arch Linux, MATE desktop, X.org.

Added to that, when I paste an URL, riot keeps adding some weird characters to it (%EF%BB%BF), making the links impossible to open by my chat partners.