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 focus the field on helper element click #197

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/vaadin-radio-group.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
</div>

<div part="helper-text"
on-click="focus"
id="[[_helperTextId]]"
aria-live="assertive"
aria-hidden$="[[_getHelperTextAriaHidden(helperText, _helperTextId, _hasSlottedHelper)]]">
Expand Down
11 changes: 11 additions & 0 deletions test/vaadin-radio-group.html
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,17 @@

expect(radioButtonGroupWithSlottedHelper.hasAttribute('has-helper')).to.be.false;
});

it('should not get focus after helper click', () => {
const group = fixture('default-with-slotted-helper');
const spy = sinon.spy(group, 'focus');
const helper = group.querySelector('[slot="helper"]');

helper.click();

expect(spy.called).to.be.false;
});

});

describe('RTL mode', () => {
Expand Down