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: do not delegate focus when clicking on non-focusable child #53

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

sissbruecker
Copy link
Contributor

Comment on lines +146 to +162
/**
* Override logic from vaadin-control-state-mixin to only focus the summary element
* when using keyboard navigation. This avoids issues when clicking into the details,
* such as text selection and click events not working
* @override
* @protected
*/
_focus() {
if (!this.focusElement || this._isShiftTabbing) {
return;
}

if (this._keyboardActive) {
this.focusElement.focus();
}
this._setFocused(true);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This just duplicates the logic from ControlStateMixin, while adding the check for this._keyboardActive on line 158.

@CLAassistant
Copy link

CLAassistant commented Mar 17, 2022

CLA assistant check
All committers have signed the CLA.

@sissbruecker sissbruecker force-pushed the fix/delegate_focus_keyboard_only branch from f1ca023 to 86656ce Compare March 18, 2022 07:43
@sissbruecker sissbruecker merged commit d184e03 into master Mar 18, 2022
@sissbruecker sissbruecker deleted the fix/delegate_focus_keyboard_only branch March 18, 2022 09:55
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.

3 participants