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.
Fixes:
index.js:1 Warning: Failed prop type: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.
This grabs the docs via the @pybricks/ide-docs package and copies them
to the build directory with copy-webpack-plugin.
The service worker automatically picks up these files for precache
since they go through webpack.
Since the img is in a span, it was treated as text and added 4 pixels
on the bottom for the descender height.
By using `display: block;` it won't be treated as text.
Fixes pybricks/pybricks-code#268
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.
This fixes multiple didFailToFinish() actions for a single flash
firmware request in certain cases.
Since 783f7e2 is fixed, waitForDidRequest() will always return with
success or error. So when used alone, waitForDidRequest() will process
the error. When using race(waitForDidRequest(), waitForResponse()),
waitForResponse() will handle the error if it wins the race and cancel
waitForResponse().