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

Textbox selection is still visible outside of the clipPath #10274

Open
drinkspiller opened this issue Nov 14, 2024 · 6 comments
Open

Textbox selection is still visible outside of the clipPath #10274

drinkspiller opened this issue Nov 14, 2024 · 6 comments

Comments

@drinkspiller
Copy link

Textbox selection is still visible outside of the clipPath:
image

Originally posted by @drinkspiller in #10269 (comment)

@drinkspiller
Copy link
Author

Note: In addition to the selection, the cursor also appears outside of the clipped area:
image

@asturur
Copy link
Member

asturur commented Nov 15, 2024

Thanks for opening the issue.
This is a bit of a complicated issue, what do you think is the use case of this? can you explain it a bit?
Why would you like to be able to edit text but have no idea where cursor/selections are?

Because when we bake a behavior in the library we need to make sure it is at least supported by common sense

@drinkspiller
Copy link
Author

Thanks, @asturur , I appreciate your reply.

That demo essentially replicates what in HTML would be a div with overflow: hidden. The expected behavior is that anything outside of the area is hidden, including cursor or selected text. (demo)

Likewise, a clipPath defines the area inside of which contents are visible. Common sense is that when an object specifies a clipPath defining the area in which content is visible, that content outside that is not visible.

@drinkspiller
Copy link
Author

drinkspiller commented Nov 15, 2024

From the other perspective, what is the justification for "a clipPath defines the area in which things are visible, but sometimes things (e.g. selection, cursor) are actually still visible outside the clipped area"?

@asturur
Copy link
Member

asturur commented Nov 15, 2024

I wasn't debating the logic itself of clipping.
I was just thinking who wants to edit text in a clipped container.
I understand from a pure concept of the api it make sense that what is clipped is not visible.

I m trying to understand how important it is to get fixed.

@drinkspiller
Copy link
Author

drinkspiller commented Nov 16, 2024 via email

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

No branches or pull requests

2 participants