oliverschwendener/ueli

ueli input window moves while typing

jonhil opened this issue ยท 26 comments

When typing in the ueli input window the window moves.
With every input keystroke the ueli window moves up and left.

Start:
ueli_1
Result:
ueli_2

Expected behavior:
A not moving input window ;)

ueli 4.7.0
Windows 10 Education N 1803

Haha wtf, I have never seen this before and I have litterally no idea what it could be. ๐Ÿ˜… I can't reproduce your bug. Can you clone the repo and start ueli from the command line (instructions)? Maybe there is a clue in the console logs.

Same problem, Win10 Pro, latest release. Will add console logs if I get the time.

Maybe there is a bug when placing the window. Try to set alwaysShowOnPrimaryDisplay to true in the config file (~/ueli.config.json).

I tried to set alwaysShowOnPrimaryDisplay to true and restartet ueli but it didn't change the inputwindow movement.
I also cloned the repo and startet ueli from the command line but the bug still existed and there was no info or error in the console. Or is there defined logging location?

At the moment there is only console logging.

Ok. Then this is all I got from the console:
ฮป yarn start
yarn run v1.7.0
$ ./node_modules/.bin/electron . --enable-logging
Batchvorgang abbrechen (J/N)? j

I opened multiple programs but the movement bug was consistent. Sorry for not having more info.

Unfortunately I have no clue what it could be ๐Ÿ˜ข

No Problem ๐Ÿ˜‰
Sadly the newest 5.0.0 update doesn't solve the bug.
But I'll keep you informed maybe it'll disappear magically with another update ๐Ÿ˜‹

I found the cause. If you set this value > 100%, Ueli starts to move when typing:
image

@khanhas Thank you for your research!
To be more precise: if you set the custom scaling value to a value that is not listed here...

image

...the window starts moving while typing.

@jonhil & @LevinFaber Did you set a custom scaling in Windows?

I added this to known bugs.

@oliverschwendener oh yeah I used a custom value there and forgot to set it back :P
changed it to 100% and everything is working perfekt again ๐Ÿ‘ thanks!

Allright! I am closing this issue because this seems to be a bug in chromium or electron. Once again, big thanks to @khanhas for the research!

I am having this issue still. Is there any way that you guys can hardcode the app to not move? I need to have to the custom scaling to actually see my laptop screen and not to have it super big.

@oliverschwendener Any thoughts on my last comment?

@Zangoran I'm sorry, at the moment there is nothing I can do because this is a bug in electron/chromium.

@oliverschwendener This might be a stretch, but is there a way where you can add an option to hardcode the x and y value as a setting so it can't move?

As I said this is a bug of electron/chromium. The window starts to move even if I hardcode the app not to move. Even Windows itself recommends not using custom scaling so I guess you have to find another solution because there is nothing I can do.

A workaround to this issue is to turn on "Remember window position" in settings. This stops the window from moving around when custom scaling is set.

Which Electron/Chrome bug is the relevant one so that we can vote on it?

Also, the workaround by waqashsn works beautifully well.

laxu commented

Experiencing this bug as well. Turning on "Remember window position" does not seem to fix the issue. Haven't seen this in any other Electron app either.

@laxu Do you have custom UI scaling activated in Windows?

laxu commented

@laxu Do you have custom UI scaling activated in Windows?

I do, 120% custom scaling.

I don't know if there is a bug report for this on electron yet.

Here is what I tested on electron 10.1.4:

import { app, BrowserWindow } from "electron";
import { join } from "path";

let browserWindow: BrowserWindow | null;

app.on("ready", startApp);
app.on("window-all-closed", () => app.quit());

function startApp() {
    createBrowserWindow();
}

function createBrowserWindow() {
    browserWindow = new BrowserWindow({
        webPreferences: {
            nodeIntegration: true,
        },
    });
    browserWindow.loadFile(join(__dirname, "..", "views", "main.html"));

    setInterval(() => repositionWindow(), 1000);
}

function repositionWindow() {
    if (browserWindow) {
        browserWindow.center();
    }
}

I created an empty app that repositions the window every second on the center of the screen by calling center() method on the BrowserWindow. And everytime this happens the window starts to move. This only happens if a custom scaling value is set. So I guess this is a bug on electron's side.

Ok I just managed to reproduce this issue even without custom UI scaling.

Let's track this issue here: #515