-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double click tauri-drag-region to maximize #1839
Comments
I see you're on Windows, unfortunately dragging the window requires capturing the mouse and sending I see you want the |
|
I am gonna change the title since we can't do anything atm to correctly forward the double click so this issue will be about double click to maximixe instead. |
Apparently I was wrong, fixing the Aero-Snap on windows, didn't maximize the window on double clicking a drag-region. A solution to this problem can be like this, I'd like your input @lucasfernog: document.addEventListener('mousedown', (e) => {
if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) {
e.detail === 2
// only call maximize for Windows platform or other platforms that has this behavior for normal windows ?
? maximize()
: drag();
}
}) |
Makes sense @amrbashir |
Is there a way to prevent this behavior? I have a custom window without decorations and I'd like to allow moving the window, but I'd like to disable double-click to maximize and aero snap. I set a min/max size for my window in the config, but that doesn't stop the window from maximizing in either of these situations. |
@icanhazpython Sorry for the super long delay. |
Describe the bug
Double click not working on element with data-tauri-drag-region attribute
To Reproduce
Steps to reproduce the behavior:
Prebuilt packages are available if you don't want to build the project in the releases
Expected behavior
The event should be triggered
Screenshots
If applicable, add screenshots to help explain your problem.
Platform and Versions (please complete the following information):
Operating System - Windows, version 10.0.19042 X64
Webview2 - 90.0.818.62
Node.js environment
Node.js - 15.12.0
@tauri-apps/cli - 1.0.0-beta.0
@tauri-apps/api - 1.0.0-beta.1
Global packages
npm - 7.12.0
yarn - 1.22.5
Rust environment
rustc - 1.52.1
cargo - 1.52.0
App directory structure
/.git
/.github
/.history
/node_modules
/public
/src
/src-tauri
App
tauri.rs - 1.0.0-beta.1
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline' img-src: 'self'
distDir - Set automatically by Vue CLI plugin
devPath - Set automatically by Vue CLI plugin
framework - Vue.js (Vue CLI)
bundler - Webpack
The text was updated successfully, but these errors were encountered: