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

Improved tweet click event handling. #624

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Improved tweet click event handling. #624

merged 2 commits into from
Dec 4, 2023

Conversation

ephemeralViolette
Copy link
Contributor

There were some issues with tweet click event handling previously, so I fixed them. For user experience, this effectively means that:

  • Clicking on the text of the tweet (or other "deadzones") will now properly open that tweet.

I added two helper functions for determining relationship to a parent. Additionally, I added two extra classes:

  • tweet-button, which denotes a button behaviour for clickable elements that should not open the tweet. This includes all of the buttons at the bottom of the tweet, as well as the translate button.
  • tweet-edit-section, for the reply and quote editors, which should also not be interactable.

This solves issue #588.

There were some issues with tweet click event handling previously, so I
fixed them. For user experience, this effectively means that:
- Clicking on the text of the tweet (or other "deadzones") will now
  properly open that tweet.

I added two helper functions for determining relationship to a parent.
Additionally, I added two extra classes:
- tweet-button, which denotes a button behaviour for clickable elements
  that should not open the tweet. This includes all of the buttons at
  the bottom of the tweet, as well as the translate button.
- tweet-edit-section, for the reply and quote editors, which should also
not be interactable.
@dimdenGD
Copy link
Owner

dimdenGD commented Dec 4, 2023

instead of isChildOfClass and isChildOfTag you should probably use .closest

@ephemeralViolette
Copy link
Contributor Author

Forgot that existed, honestly.

@dimdenGD dimdenGD merged commit ff88a84 into dimdenGD:master Dec 4, 2023
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.

2 participants