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

Set radio button checked on host click #85

Merged
merged 1 commit into from
Aug 27, 2018
Merged

Conversation

samiheikki
Copy link
Contributor

@samiheikki samiheikki commented Aug 19, 2018

Fixes #84


This change is Reviewable

Copy link
Contributor

@platosha platosha left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @samiheikki)


src/vaadin-radio-button.html, line 211 at r1 (raw file):

            e.preventDefault();
            this.checked = true;
            this.setAttribute('active', '');

Setting the active state on click is not appropriate.

The active state should only be set during the click (set on mousedown, removed on mouseup), not after.

@samiheikki samiheikki force-pushed the fix/click-radio-button branch from f7833c9 to f366727 Compare August 21, 2018 16:23
Copy link
Contributor Author

@samiheikki samiheikki left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @platosha and @samiheikki)


src/vaadin-radio-button.html, line 211 at r1 (raw file):

Previously, platosha (Anton Platonov) wrote…

Setting the active state on click is not appropriate.

The active state should only be set during the click (set on mousedown, removed on mouseup), not after.

Good point. Removed it.

@tomivirkki
Copy link
Member


src/vaadin-radio-button.html, line 208 at r2 (raw file):

        _handleClick(e) {
          if (!this.disabled) {

Can you add a test for this condition also? (Shouldn't set a disabled host checked on click)

Copy link
Contributor

@platosha platosha left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @samiheikki)

@samiheikki samiheikki force-pushed the fix/click-radio-button branch from f366727 to e8a3773 Compare August 25, 2018 12:32
Copy link
Contributor Author

@samiheikki samiheikki left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @platosha and @tomivirkki)


src/vaadin-radio-button.html, line 208 at r2 (raw file):

Previously, tomivirkki (Tomi Virkki) wrote…

Can you add a test for this condition also? (Shouldn't set a disabled host checked on click)

Done.

Copy link
Member

@tomivirkki tomivirkki left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@limonte limonte merged commit 1696e8f into master Aug 27, 2018
@limonte limonte deleted the fix/click-radio-button branch August 27, 2018 07:55
@limonte limonte removed the in review label Aug 27, 2018
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