Commit Graph

8 Commits (e4d02fb27522bcabcfa1e78563bcef3c308ba7bb)

Author SHA1 Message Date
Aakansha Doshi 9325109836
fix: use excal id so every element has unique id (#3696)
* fix: use excal id so every element has unique id

* fix

* fix

* fix

* add docs

* fix
4 years ago
Aakansha Doshi c0047269c1
fix: focus on last active element when dialog closes (#3447)
* fix: focus on last active element when dialog closes

* useState instead of ref
4 years ago
Aakansha Doshi d126d04d17
feat: Bind keyboard events to the current excalidraw container and add handleKeyboardGlobally prop to allow host to bind to document (#3430)
* fix: Bind keyboard events to excalidraw container

* fix cases around blurring

* fix modal rendering so keyboard shortcuts work on modal as well

* Revert "fix modal rendering so keyboard shortcuts work on modal as well"

This reverts commit 2c8ec6be8e.

* Attach keyboard event in react way so we need not handle portals separately (modals)

* dnt propagate esc event when modal shown

* focus the container when help dialog closed with shift+?

* focus the help icon when help dialog on close triggered

* move focusNearestTabbableParent to util

* rename util to focusNearestParent and remove outline from excal and modal

* Add prop bindKeyGlobally to decide if keyboard events should be binded to document and allow it in excal app, revert tests

* fix

* focus container after installing library, reset library and closing error dialog

* fix tests and create util to focus container

* Add excalidraw-container class to focus on the container

* pass focus container to library to focus current instance of excal

* update docs

* remove util as it wont be used anywhere

* fix propagation not being stopped for React keyboard handling

* tweak reamde

Co-authored-by: David Luzar <luzar.david@gmail.com>

* tweak changelog

* rename prop to handleKeyboardGlobally

Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar 1e48aafb9c
fix: incorrectly caching png file handle (#3407) 4 years ago
Jed Fox 3b0fb1562d
feat: Require use of a preset dialog size; adjust dialog sizing (#2684) 4 years ago
David Luzar b997e69ebc
improvement: Tweak error message on image import (#2619)
* improvement: tweak error message on image import

* tweak copy
4 years ago
Lipis c427aa3cce
Prefer arrow functions and callbacks (#1210) 5 years ago
Kostas Bariotis 0c9459e9e5
Warn on invalid JSON file (#1159)
* add error dialog

* show error modal on file dnd

* add locales

* Update src/locales/en.json

Co-Authored-By: Lipis <lipiridis@gmail.com>

* Update src/data/blob.ts

* Update src/data/blob.ts

* fix titles, update snapshots

* make modal smaller

* fix dnd wrong file type

* reset errorMessage

Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago