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

Compose for Web: Copy & paste support for TextField #4036

Open
StefanOltmann opened this issue Dec 13, 2023 · 13 comments
Open

Compose for Web: Copy & paste support for TextField #4036

StefanOltmann opened this issue Dec 13, 2023 · 13 comments
Assignees
Labels
enhancement New feature or request web

Comments

@StefanOltmann
Copy link

On the desktop version, there is a context menu offering options such as "cut", "copy", "paste" and "select all" complemented by convenient shortcuts like CMD+C and CMD+V.

It appears that a similar functionality is currently absent in the Compose for Web interface.

@StefanOltmann StefanOltmann added enhancement New feature or request submitted labels Dec 13, 2023
@terrakok terrakok added the web label Dec 14, 2023
@terrakok
Copy link
Collaborator

Yes, we are going to support it in the future 👍

@usert-4
Copy link

usert-4 commented Dec 28, 2023

Hello, @terrakok as we are in the subject of text selection, what about text search browser feature ? for example on Chrome i guess it's text based on html, what about when ui is in a canvas ?
could image analyzing/almost ai help here for example for identifying text but it would be on browser side ? and others thing such as when content is out of screen/not drawn, or there are others possible ways for making this work

@eymar
Copy link
Collaborator

eymar commented Dec 28, 2023

what about text search browser feature

if this feature becomes available at some point, it probably won't work same way it works in Chrome with html pages.

It's more likely to work like in google docs, and I'd say it's a feature that an app implementation should take care of.

Currently, it's not planned, but can be considered.

@usert-4
Copy link

usert-4 commented Dec 28, 2023

yes, we could also imagine a system where Compose place html tag informations on the elements in the canvas(location etc..), i also thinked about such thing for debugging/testing purpose, but that's almost another subject that could be seen later, thanks

@dhakehurst
Copy link

any idea on the timescale...when will this get supported ?

@eymar
Copy link
Collaborator

eymar commented Feb 1, 2024

any idea on the timescale...when will this get supported ?

We aim to make it properly implemented in 1.7 version of Compose Multiplatform.

@MahmoudMabrok
Copy link

I think paste not working in web version , I must enter all data, is this issue solved or included in current issue ?

@dbaroncelli
Copy link

yes, it's very annoying that cut/paste doesn't work on compose web

@Skaldebane
Copy link

@usert-4 Actually that's needed for accessibility as well, so both of these are likely going to be implemented at the same time.

@tombaileywzd
Copy link

We aim to make it properly implemented in 1.7 version of Compose Multiplatform.

Just wondering if Hiragana/Katakana support is in scope for the release with cut/copy/paste support? At the moment, Hiragana and Katakana inputs on MacOS show up as Romaji. h + e should become but ends up as he

@Schahen
Copy link
Collaborator

Schahen commented Mar 26, 2024

@tombaileywzd than you for this report, we haven't tested clipoard events with hiragana/katakana so far, we definitely want to support it (general-purpose framework that does not support Unicode to full extent will be, well, no so general-purpose). As of the actual time framework it's just difficult to estimate. But we'll get there. Also, I'll create a task not to forget add specific test case to cover your scenario.

@dmentx
Copy link

dmentx commented Jul 9, 2024

Does someone have a workaround?

@Skaldebane
Copy link

@Schahen I think this relates to supporting input methods in general. Browsers tell input methods that they do support them (which they do in normal HTML), and so Compose Web has to integrate with that somehow.

Interestingly, Compose Desktop doesn't show the intermediate text and suggestions inline, but it works nevertheless. I may be totally wrong, but I assume this is because Compose Desktop doesn't announce that it supports IMEs at all, and so they work in this sort of fallback mode where the text is prepared in a small system pop-up before inputting the final result into the app. Just a wild guess, I really have no idea how IMEs work, but that's how it behaves on desktop (Linux). This is kind of a separate thing but I just thought it was interesting.

Flutter Web (wasm) seems to support this, and can be tested in any text field in the Material 3 demo: https://flutterweb-wasm.web.app/. There seems to be no Japanese font so it all ends up as tofu (the little squares), but the IME is clearly working and replacing characters inline. Maybe you can draw from their implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request web
Projects
None yet
Development

No branches or pull requests