Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

request: support text input with clipboard events disabled. #11728

Closed
gcb opened this issue Oct 10, 2023 · 4 comments
Closed

request: support text input with clipboard events disabled. #11728

gcb opened this issue Oct 10, 2023 · 4 comments

Comments

@gcb
Copy link

gcb commented Oct 10, 2023

some certification bodies requires disabling clipboardEvents. I will update this later on with any doc i can share.

This can impact govt and financial institution adoption of element-web (and other clients using this SDK) as it breaks pasting to the div-as-input component here.

Not to mention usability/18n as several niche browsers/extensions/ime input do not work well with that pattern.

you can simulate cases where that feature is not available on firefox, about:config, dom.event.clipboardevents.enabled=false. copy and cut (with preventDefault at the end of the methods) works fine. Only paste is impacted currently.

@gcb
Copy link
Author

gcb commented Oct 10, 2023

I can try a patch around https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/components/views/rooms/BasicMessageComposer.tsx#L357 but I am unsure about the second edge case (line 360). Someone more familiar with that would be more productive.

@t3chguy
Copy link
Member

t3chguy commented Oct 11, 2023

See #9666

@gcb worth noting that simply removing that preventDefault will most likely make the paste look like it worked but then not be in the Composer's internal data model and thus not be part of the message you send. YMMV.

@t3chguy t3chguy closed this as completed Oct 11, 2023
@gcb
Copy link
Author

gcb commented Oct 11, 2023

This sdk is not used anywhere else?

if it's only there, i guess they prefer rich-text over all integrations that are possible using a simple text box element-hq/element-web#25544

thank you.

@t3chguy
Copy link
Member

t3chguy commented Oct 11, 2023

I guess you didn't read the README

As of Aug 2018, the only skin that exists is vector-im/element-web; it and matrix-org/matrix-react-sdk should effectively be considered as a single project (for instance, matrix-react-sdk bugs are currently filed against vector-im/element-web rather than this project).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants