korlibs / korlibs/korge

Button Touched Through Open Combo Box

Open
#711 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
3k
Forks
148
Avg merge
13h 44m
Merged PRs (30d)
1

Description

**Describe the bug**

I noticed bleed through where the button under my combo box is clicked.

Given a combo box that when opened covers another button, when the combo box is clicked in an area over the button, the button is also clicked.

In my example, clicking precipitation also clicks the random seed button.

Combobox closed
![image](https://user-images.githubusercontent.com/4498895/126001096-cd443506-e70c-46b2-af9a-a86e7ee7d278.png)

Combo box open (where bleed through happens)
![image](https://user-images.githubusercontent.com/4498895/126001125-8c30daf1-eaee-4651-a323-d61cfe30ae8b.png)

[Code](https://github.com/ManApart/stars-between/blob/korge/src/commonMain/kotlin/ui/planetScene/PlanetControls.kt)

**Annoyment level**

* [x] 1 - No rush from my side
* [ ] 2 - It is inconvenient, but I can circumvent the issue for now
* [ ] 3 - FUUUU
* [ ] 4

I was able to do a work around by setting a ['don't press me' var](https://github.com/ManApart/stars-between/blob/korge/src/commonMain/kotlin/ui/planetScene/PlanetControls.kt#L39) when you hover over the combo box, but it seems like the touch shouldn't go through the combo box.

**Payment**

> How do you plan to compensate the time we will invest fixing this?

* [x] I will add a message with "Thanks" when merged to let you know I'm grateful
* [ ] I will also add a [meme image](https://imgflip.com/memegenerator) relevant to the issue to make you smile so we both have fun
* [ ] In fact, I'm going to add a meme here in this issue too
* [x] I'm going to write about KorGE in my blog, spread the voice on social networks, or maybe even make a TikTok wearing a KorGE T-Shirt while dancing

I'm really loving Korge, and currently am working on porting all my 'active' game prototypes to it. I intend to write a blog post once I have more games ported and I'm already telling everyone who will listen about Korge. :D

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked reproduction in korge/src/commonMain/kotlin/ui/planetScene/PlanetControls.kt, especially the combo box and the workaround around line 39. Reproduce the open-combo-box interaction and trace how the click reaches the underlying button. Done means clicking the combo box does not also activate the covered button.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.