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

Text selection fails on some paddings/margins. #3186

Open
1 task
Psychpsyo opened this issue Jan 8, 2025 · 0 comments
Open
1 task

Text selection fails on some paddings/margins. #3186

Psychpsyo opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working has repro We have a way to reproduce this bug.

Comments

@Psychpsyo
Copy link
Contributor

Psychpsyo commented Jan 8, 2025

Summary

When I drag a text selection onto the padding in the given repo, it does not correctly select the text.

Operating system

Linux

Steps to reproduce

  1. Go to data:text/html,<style>span {border: 2px solid black;padding: 2em;display: inline-block;}</style><span>foo <span>bar</span></span>
  2. Start a selection on the word "foo".
  3. Drag that selection into the box with the "bar", but not onto it.
  4. Observe that foo is no longer selected.

Expected behavior

The selection should go up to the end of the text "foo ".

Actual behavior

The selection is very thin, at the start of "foo".

URL for a reduced test case

data:text/html,<style>span {border: 2px solid black;padding: 2em;display: inline-block;}</style><span>foo <span>bar</span></span>

HTML/SVG/etc. source for a reduced test case

<style>
span {
  border: 2px solid black;
  padding: 2em;
  display: inline-block;
}
</style>
<span>foo <span>bar</span></span>

Log output and (if possible) backtrace

None.

Screenshots or screen recordings

image

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.
@Psychpsyo Psychpsyo changed the title Text selection fails on some padding/margins. Text selection fails on some paddings/margins. Jan 8, 2025
@AtkinsSJ AtkinsSJ added bug Something isn't working has repro We have a way to reproduce this bug. labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has repro We have a way to reproduce this bug.
Projects
None yet
Development

No branches or pull requests

2 participants