This prevents the navbar buttons from gaining focus when clicked.
This way it prevents losing focus from the editor or terminal.
It also prevents the settings button from being highlighted after
the settings menu is closed.
This fixes a crash caused by react-dropzone due to the fact that button
elements aren't compatible with whatever react-dropzone is looking for.
TypeError: rootRef.current.isEqualNode is not a function
(anonymous function)
node_modules/react-dropzone/dist/es/index.js:473
470 |
471 | var onKeyDownCb = useCallback(function (event) {
472 | // Ignore keyboard events bubbling up the DOM tree
> 473 | if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
| ^ 474 | return;
475 | }
476 |
Wrapping it in a div element solves the problem.
Also disable tabIndex on the dropzone to prevent the button from being
focused twice when tabbing through the buttons.
- includes firmware .zip for movehub and cplushub
- firmware flash button no longer opens file dialog
- now connects first, then choses firmware based on connected device
- drag and drop of custom firmware still works