tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[feat] continually raising `tauri://file-drop-hover` event and providing current cursor position

Open MagicCrazyMan opened this issue 2 years ago • 4 comments

Describe the problem

i am working on an app which is available to highlight some specified html elements while dragging & dropping files (and i need the absolute file path). But i found that tauri://file-drop-hover event only happens once when moving file from outside into inside of the window, and did not raise again while moving inside the winodow, Is it possible to continually raisetauri://file-drop-hover and tell me the newly cursor position?

BTW: I need the absolute path of the dropped file, it is not a solution to disable fileDropEnabled since the chromium native drag & drop feature does not giving me that. or maybe there is some other solution?

Describe the solution you'd like

continually raising tauri://file-drop-hover and providing current cursor position

Alternatives considered

No response

Additional context

No response

MagicCrazyMan avatar Nov 01 '23 07:11 MagicCrazyMan

Any updates on this? Reactive drag hovering is only possible if this is implemented somehow and tauri://file-drop-hover is essentially useless without this, even with the position provided in Tauri 2.0.

jaydevelopsstuff avatar Jan 12 '24 19:01 jaydevelopsstuff

+1

hut36 avatar Jan 27 '24 13:01 hut36

Have you seen https://github.com/crabnebula-dev/drag-rs

denjell-crabnebula avatar Feb 13 '24 09:02 denjell-crabnebula

Have you seen https://github.com/crabnebula-dev/drag-rs

@denjell-crabnebula I'm not sure that repo pertains to this. This is an issue with Tauri 2.0 (1.0 drop event doesn't even have cursor pos iirc) and to my most recent knowledge, drag-rs only supports 1.x and is only for initiating a drag, not handling dragover or drop events.

jaydevelopsstuff avatar Feb 13 '24 23:02 jaydevelopsstuff

@amrbashir I see that Wry has had the necessary changes made, any progress on the Tauri side of things?

jaydevelopsstuff avatar Mar 22 '24 21:03 jaydevelopsstuff

being worked on in https://github.com/tauri-apps/tauri/pull/9100

amrbashir avatar Mar 26 '24 15:03 amrbashir