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

[DE55422] Input text has click event which propagates upwards. Stop p… #4278

Closed

Conversation

jesseag
Copy link
Contributor

@jesseag jesseag commented Nov 24, 2023

…ropagation of this click event so the click handler in rubric feedback no longer receives this event.

Rally ticket: DE55422

Please refer to the following PR/discussion.
https://github.com/BrightspaceUI/htmleditor/pull/1914
https://github.com/BrightspaceUI/htmleditor/pull/1914#discussion_r1403460071

A click event is bubbling upwards from the d2l-input-text. After discussion with @grant-cleary in the PR linked above I am trying to determine whether we should stop propagation of this click event in d2l-input-text or if this is intended behaviour to have the click event propagate upwards? If this is intended behaviour then I will go ahead and merge my changes in the above htmleditor PR. However, if this is not the intended behaviour then I would like to stop propagation of this click event directly at the source. Thanks!

@jesseag jesseag requested a review from a team as a code owner November 24, 2023 16:06
@jesseag jesseag requested a review from grant-cleary November 24, 2023 16:07
Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-4278/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@jesseag
Copy link
Contributor Author

jesseag commented Nov 24, 2023

@BrightspaceUI/gaudi-dev
Should I be concerned about the test/vdiff failures? A re-run fixed the failures but I'm not sure if I should be investigating them more closely.

@dlockhart
Copy link
Member

As you discussed in that thread, I don't think we can stop propagating this event -- there's no telling if existing consumers could be relying on it, making this a breaking change. Native click events in general always propagate up through the DOM no matter what element was clicked (so this isn't a d2l-input-text specific problem)... I think it would be best to just handle this from the editor code.

@jesseag
Copy link
Contributor Author

jesseag commented Nov 24, 2023

As you discussed in that thread, I don't think we can stop propagating this event -- there's no telling if existing consumers could be relying on it, making this a breaking change. Native click events in general always propagate up through the DOM no matter what element was clicked (so this isn't a d2l-input-text specific problem)... I think it would be best to just handle this from the editor code.

Sure this resonates with me. I don't want to be making any breaking changes.
I'll close this PR down then and merge in my fix in the htmleditor repo instead. Thanks!

@jesseag jesseag closed this Nov 24, 2023
@jesseag jesseag deleted the jgrasso/DE55422-input-text-click-event-changes-focus branch November 24, 2023 19:34
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