refactor!(core & api): rename drag events for better consistency and clarity#10170
refactor!(core & api): rename drag events for better consistency and clarity#10170lucasfernog merged 6 commits intodevfrom
Conversation
| const unlistenDrop = await this.listen<DragDropPayload>( | ||
| TauriEvent.DROP, | ||
| const unlistenDragOver = await this.listen<DragPayload>( | ||
| TauriEvent.DRAG_LEAVE, |
There was a problem hiding this comment.
This listener should be attached to TauriEvent.DRAG_OVER, no?
| - `TauriEvent.DRAG` -> `TauriEvent.DRAG_ENTER` | ||
| - `TauriEvent.DROP_OVER` -> `TauriEvent.DRAG_OVER` | ||
| - `TauriEvent.DROP` -> `TauriEvent.DRAG_DROP` | ||
| - `TauriEvent.DROP_CANCELLED` -> `TauriEvent::DRAG_LEAVE` |
There was a problem hiding this comment.
'drag leave' makes sense on the JS world because you must define which elements receive the event; in our case 'leave' is misleading because it's not triggered when the drag operation moves out of the window
There was a problem hiding this comment.
It should be triggered, if not, that's a bug
There was a problem hiding this comment.
oohhh i didn't know we changed that on wry, let me check
There was a problem hiding this comment.
works indeed, but now i miss the old https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragend_event from https://docs.rs/wry/0.29.0/wry/webview/enum.FileDropEvent.html#variant.Cancelled
There was a problem hiding this comment.
we can't differentiate between cancelled and leave so we combined them, not sure what's the best name here
Package Changes Through 4b39f1bThere are 9 changes which include tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease, @tauri-apps/api with prerelease, tauri-bundler with prerelease, tauri-macros with prerelease, tauri-codegen with prerelease, tauri-runtime-wry with prerelease, tauri-utils with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
No description provided.