Context: I am developing a Power Apps application where I use a gallery (Gallery1) to dynamically display items. Inside each gallery item, there is a button (Button1) with an action defined in its OnSelect property.
Problem: When I start the app in Play mode, the buttons inside the gallery trigger automatically after approximately 14 seconds, even though the user has not clicked them. I verified this using Power Apps Monitor, where the action is logged as User Action: Select, but no actual user interaction occurs.
What I have tried so far:
1️⃣ Modifying TabIndex
Set TabIndex = -1 on the buttons to prevent them from receiving focus automatically. Result: No effect, buttons still trigger automatically. 2️⃣ Disabling automatic selection in the gallery
Set Selectable = false in the gallery. Result: Prevents item selection, but the buttons inside the gallery still execute OnSelect automatically. 3️⃣ Temporarily disabling buttons with DisplayMode
Set DisplayMode = Disabled for buttons at the start and enabled them later using a Timer after 14 seconds. Result: Partially works, but not optimal since buttons remain inactive for too long. 4️⃣ Redirecting focus to another control
Added an invisible button outside the gallery and used Select(InvisibleButton) in the screen's OnVisible property. Result: Did not work, buttons inside the gallery still execute OnSelect automatically. 5️⃣ Using a control variable
Tried to condition the OnSelect of buttons with a variable (varUserClicked) that only activates when the user actually clicks. Code in OnSelect: If(varUserClicked, // Button action ) Result: Buttons still trigger automatically, even though varUserClicked does not change manually. Questions: