#setPosition() bug?

2 messages · Page 1 of 1 (latest)

lost sluice
#

let win = tauri.window.getCurrent()
await win.setPosition(new PhysicalPosition(100, 100))
let pos = await thisWin.innerPosition()
console.log(pos)

{
"type": "Physical",
"x": 108,
"y": 131
}

Setting the window with setPosition() will ALWAYS offset by 8 on X and 31 on Y.

await win.setPosition(new PhysicalPosition(850, 440))

will put the window at 858, 471.

using new LogicalPosition() changes nothing.

I'm on Windows 11, Tauri @1.5.0

crisp locust
#

inner position returns the position of the webview itself while setPosition sets the outer position, so i assume 8 and 31 are due to the window borders & title.