Information generated after a lot of going round in circles with Claude:
Platform:
iPhone, Chrome on iOS. iPad Chrome partially affected.
Bugs:
- Can't close a category by tapping it again — tapping an open category closes it momentarily then it reopens (iOS phone only). Desktop and iPad Chrome work correctly.
- Wrong category opens when tapping below an expanded subcategory — present on both iPhone and iPad Chrome; desktop works correctly.
What was tried:
In toolbox.js, CustomCollapsibleToolboxCategory.createDom_ — added a lastPointerWasTouch flag so that touch events skip the custom pointerdown/click handlers and let Blockly's own onClick_ handle the toggle. I reverted this.
Key diagnostic facts:
- iPhone Chrome fires
pointerdown → touchstart → pointerup → touchend — no click event
- iPad Chrome apparently fires a
click event after touch (explaining why the fix works there)
Holding and dragging to a different spot before releasing keeps the category closed on iPhone — so the reopen is triggered by something that fires on the category element itself on/after release
categoryHasFocus_() always returns false on touch because touch doesn't set DOM focus
Relevant code: toolbox.js around line 5091 (createDom_ event listeners), and CustomCollapsibleToolboxCategory.setSelected at line 5052 (forces setExpanded(true) whenever isSelected — potential contributor to reopen).
Information generated after a lot of going round in circles with Claude:
Platform:
iPhone, Chrome on iOS. iPad Chrome partially affected.
Bugs:
What was tried:
In
toolbox.js,CustomCollapsibleToolboxCategory.createDom_ — added alastPointerWasTouchflag so that touch events skip the custompointerdown/clickhandlers and let Blockly's ownonClick_handle the toggle. I reverted this.Key diagnostic facts:
pointerdown → touchstart → pointerup → touchend— no click eventclickevent after touch (explaining why the fix works there)Holding and dragging to a different spot before releasing keeps the category closed on iPhone — so the reopen is triggered by something that fires on the category element itself on/after release
categoryHasFocus_()always returnsfalseon touch because touch doesn't set DOM focusRelevant code:
toolbox.jsaround line 5091 (createDom_event listeners), andCustomCollapsibleToolboxCategory.setSelectedat line 5052 (forcessetExpanded(true)wheneverisSelected— potential contributor to reopen).