Skip to content

Set pointer-events-auto class on HomepageHero text #345

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

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

AdamAnSubtractM
Copy link
Contributor

Set pointer-events to none for the HomepageHero canvas so that text can be selected.

@CLAassistant
Copy link

CLAassistant commented Mar 31, 2024

CLA assistant check
All committers have signed the CLA.

@lucacasonato
Copy link
Member

Not allowing to select the hero text was intentional: #115. Is there a specific issue you are running into?

@AdamAnSubtractM
Copy link
Contributor Author

Not allowing to select the hero text was intentional: #115. Is there a specific issue you are running into?

Did not realize this was intentional. I was trying to copy and paste the text to send to someone and noticed I could not. Seemed like a usability issue to me and opened a PR. If the JSR team feels users shouldn't be able to select text on the page, then I don't think Its my place to say otherwise.

Let me know if you want me to close this, otherwise, feel free to decline. Thanks for your time.

@josh-collinsworth
Copy link
Contributor

@AdamAnSubtractM Thanks for the contribution! I agree; this is an issue for usability.

However, this approach prevents some interactions with the background. I believe the better way to achieve the desired outcome would be to simply add the pointer-events-auto class to the <div> that contains the text in question. That will allow its text to be selectable, while keeping everything around it as-is.

@AdamAnSubtractM
Copy link
Contributor Author

@AdamAnSubtractM Thanks for the contribution! I agree; this is an issue for usability.

However, this approach prevents some interactions with the background. I believe the better way to achieve the desired outcome would be to simply add the pointer-events-auto class to the <div> that contains the text in question. That will allow its text to be selectable, while keeping everything around it as-is.

Thanks @josh-collinsworth . I'll update the PR with your suggestions.

@AdamAnSubtractM AdamAnSubtractM changed the title Set pointer-events to none in the HomepageHero Set pointer-events-auto class on HomepageHero text Apr 19, 2024
@AdamAnSubtractM
Copy link
Contributor Author

@AdamAnSubtractM Thanks for the contribution! I agree; this is an issue for usability.

However, this approach prevents some interactions with the background. I believe the better way to achieve the desired outcome would be to simply add the pointer-events-auto class to the <div> that contains the text in question. That will allow its text to be selectable, while keeping everything around it as-is.

@josh-collinsworth - PR updated, thanks.

Copy link
Contributor

@josh-collinsworth josh-collinsworth left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@josh-collinsworth josh-collinsworth added this pull request to the merge queue Apr 19, 2024
Merged via the queue into jsr-io:main with commit 30134b5 Apr 19, 2024
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

Successfully merging this pull request may close these issues.

4 participants