Clicking a clickable component inside another disabled clickable component throws IllegalStateException #5064
Labels
bug
Something isn't working
desktop
input
Touch, mouse, keyboard input related
p:critical
Critical priority
regression
reproduced
Describe the bug
When a clickable component is contained inside of another clickable component it can cause an error.
Affected platforms
Versions
Libraries:
Kotlin version: 2.0.0
OS version(s) (required for Desktop and iOS issues): Mac 14.5
OS architecture (x86 or arm64): arm64
JDK (for desktop issues): 20
To Reproduce
I am including two reproducers. One in which I use the
clickable
modifier, and another withButton
components.Reproducer 1
Reproducer 2
Context
I am trying to create a custom tab pane. The tab should be a clickable element, so that the user can select a tab. The currently selected tab has its clickable modifier disabled because it is already selected. Each tab also has an "x" icon for removing the tab. Basically, just like the tabs in any web browser which also have a clickable "x" inside of the clickable tab itself.
Expected behavior
No exception to be thrown. Or if an exception must be thrown, make it more informative and actionable.
Observed behavior
An exception is thrown with a popup message. Note the exception includes only internal stack trace elements.
This exception is thrown. Click here to expand and see the full stack trace.
The text was updated successfully, but these errors were encountered: