microsoft / pxt

Microsoft MakeCode (PXT - Programming eXperience Toolkit)
https://makecode.com
MIT License
2.1k stars 588 forks source link

remove id from blockly search input #10198

Closed riknoll closed 2 months ago

riknoll commented 2 months ago

fixes https://github.com/microsoft/pxt-microbit/issues/5962

our webapp doesn't use the blockly toolbox, but it does use the blockly toolbox div (we just inject our own react component). however, blockly registers an onclick handler on that div that tries to figure out which toolbox category is being clicked based on the id of the element. our toolbox search input was the only element in that div with an id set, so it was triggering an exception whenever it was clicked.

fixed in the simplest way possible: i removed the id

also worth noting that this exception was also occurring in chrome; ios safari seems to be the only case where this broke the toolbox for whatever reason. maybe because it uses touch?

riknoll commented 2 months ago

tested the fix in the ipad simulator on my mac