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

fix(wasm): double-click-selecting a textblock would bleed into other textblocks #18031

Closed

Conversation

ramezgerges
Copy link
Contributor

GitHub Issue (If applicable): closes #13440, closes unoplatform/Uno.Themes#1459

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18031/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18031/index.html

@@ -135,6 +135,7 @@ embed.uno-frameworkelement.uno-unarranged {
background-clip: text !important;
/* overflow:hidden is required for text-overflow: ellipsis to work correctly */
overflow: hidden;
display: inline-flex; /* This is a workaround to prevent selection bleeding, see https://github.com/unoplatform/uno/issues/13440 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have some potential disadvantage for us?

Copy link
Contributor Author

@ramezgerges ramezgerges Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that it shouldn't have any visible side effects.

elements are inline by default and flex only affects child elements, except that we don't nest elements inside a <p>.

Copy link
Member

@Youssef1313 Youssef1313 Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do nest children inside p. A TextBlock can have child Runs.

image

Copy link
Contributor

@ajpinedam ajpinedam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a good fix.

@MartinZikmund
Copy link
Member

@ramezgerges seems some WASM test is failing here

@ramezgerges
Copy link
Contributor Author

Switching to inline-table fixed the alignment problem but broke text trimming. I tried all display values and they either don't fix the problem or break text trimming. This is blocked for now.

@ramezgerges ramezgerges marked this pull request as draft September 2, 2024 19:41
auto-merge was automatically disabled September 2, 2024 19:41

Pull request was converted to draft

@ramezgerges ramezgerges deleted the wasm_text_selection_bleeding branch September 26, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants