Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't cut and paste user pills in the composer #11378

Closed
nadonomy opened this issue Nov 13, 2019 · 5 comments
Closed

Can't cut and paste user pills in the composer #11378

nadonomy opened this issue Nov 13, 2019 · 5 comments
Labels
A-Composer A-Pills T-Enhancement Z-Community-PR Issue is solved by a community member's PR

Comments

@nadonomy
Copy link
Contributor

Often I'll write a message in one room then realise it's better placed in another. When cutting or copying messages with pills to the clipboard, it seems they're reduced to plaintext. It's a pain to have to go through the message and manually replace the pills after pasting.

@bwindels
Copy link
Contributor

bwindels commented Nov 13, 2019

Indeed. I suppose we could intercept the copy event and add a custom mimetype, e.g. application/x-riot-composer to the clipboard that contains the editor parts as json, and look for that mimetype over text/plain when pasting in cider.

@turt2live
Copy link
Member

Fixed by matrix-org/matrix-react-sdk#3828

@turt2live
Copy link
Member

Reports are it doesn't work

@turt2live turt2live reopened this Jan 16, 2020
@turt2live turt2live removed the Z-Community-PR Issue is solved by a community member's PR label Jan 16, 2020
@turt2live
Copy link
Member

The PR works (mostly) locally, just not on /develop at all. Looks like there's at least one bug where the deletion doesn't work fully and leaves a 0-length string in the composer. Am working on it.

@turt2live turt2live self-assigned this Jan 16, 2020
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Jan 16, 2020
The previous function did in fact remove the elements, but left the model thinking there was a zero-length string. This approach deletes the text from the model and the DOM, resulting in the placeholder being shown when cutting all the text.

Part of element-hq/element-web#11378
@turt2live
Copy link
Member

Closing because the bug is actually fixed, it just wasn't deployed to /develop. matrix-org/matrix-react-sdk#3848 fixes a regression caused by matrix-org/matrix-react-sdk#3828

@turt2live turt2live removed their assignment Jan 16, 2020
@turt2live turt2live added the Z-Community-PR Issue is solved by a community member's PR label Jan 16, 2020
@jryans jryans added the A-Pills label Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer A-Pills T-Enhancement Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

No branches or pull requests

4 participants