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

SwitchButton: set to readOnly does not prevent the SwitchButton from triggering change handlers #788

Closed
FrankHossfeld opened this issue Jun 20, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@FrankHossfeld
Copy link
Contributor

Create a SwitchButton:

SwitchButton mySwitchButton = SwitchButton.create("MyLabel", "No", "Yes"); 
mySwitchButton.addChangeHandler(e -> DomGlobal.window.alert("ping"));
mySwitchButton.setReadOnly(true);

When clicking the SwitchButton, the alert appears.

I'll expect that a form element does not trigger a changeHandler if set to readOnly.

Seen in Domino-UI 1.0.0-rc18, machOS, Chrome.

SwitchButtonInAction-1.mov
@vegegoku vegegoku added the bug Something isn't working label Jun 21, 2023
@vegegoku vegegoku added this to the 1.0.0-RC19 milestone Jun 21, 2023
@vegegoku vegegoku self-assigned this Jun 22, 2023
vegegoku added a commit that referenced this issue Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants