Revert "feat(core): add app-region: drag to data-tauri-drag-region (#9789)"#9860
Conversation
|
To be honest, vscode's title bar is implemented using
I think we should go with the other way around, document this and let users to opt-out (they can just do |
yes but it is cross-platfrom because they are using Chrome which is not the case for us,
However the fact that I just want to discuss and find an acceptable middle ground, maybe we change the |
|
I also hope to revert this commit. I think we haven't designed this yet. This update basically completely destroyed the software I wrote Tran. It originally had the entire window draggable, and you can directly interact with the elements below by double-clicking, and you can also scroll, and the menu will not appear when you right-click. I thought about it for a long time last night and couldn't figure out how to do this elegantly under the current solution. |
|
You can use I'm still leaning towards using as much native things as possible (probably because I got hurt way too many times on bad custom ones), but those are all valid points on why this should be opt-in not opt-out Guess we can document this and making people opt-in if they only plan to use it as a normal title bar |
I encountered a problem. I directly set its style or drag as you said. When I set the force, it cannot be dragged. |
|
We should merge this asap and release @lucasfernog , then we can iterate on a better solution in another PR |

This reverts commit ae6b13d.
While the
app-region: dragdoes work correctly and fix the touch issue, it has a few differences:data-tauri-drag-regionworks only if the click was on an element that has it, this allows buttons in the custom titlebar to work, howeverapp-region: dragwill treat the whole area as a titlebar won't even allow clicks on buttonsThe buttons issue could be solved by users if they structure their titlebar to separate the buttons container from the container that has
app-region: drag, like this:But realistically speaking, this will become harder when implementing a complex titlebar like VSCode custom titlebar implementation, and
app-region: dragdoesn't provide the needed flexibility.In conclusion, I think we should revert this and just document that users can add
app-region: dragif they wish so.