Skip to content
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

ueli input window moves while typing #37

Closed
jonhil opened this issue Jun 27, 2018 · 26 comments
Closed

ueli input window moves while typing #37

jonhil opened this issue Jun 27, 2018 · 26 comments
Labels

Comments

@jonhil
Copy link

jonhil commented Jun 27, 2018

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

@oliverschwendener
Copy link
Owner

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.

@LevinFaber
Copy link

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

@oliverschwendener
Copy link
Owner

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

@jonhil
Copy link
Author

jonhil commented Jul 12, 2018

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?

@oliverschwendener
Copy link
Owner

At the moment there is only console logging.

@jonhil
Copy link
Author

jonhil commented Jul 12, 2018

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.

@oliverschwendener
Copy link
Owner

Unfortunately I have no clue what it could be 😢

@jonhil
Copy link
Author

jonhil commented Jul 23, 2018

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 😋

@khanhas
Copy link
Contributor

khanhas commented Aug 28, 2018

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

@oliverschwendener
Copy link
Owner

@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?

@oliverschwendener
Copy link
Owner

I added this to known bugs.

@jonhil
Copy link
Author

jonhil commented Sep 3, 2018

@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!

@oliverschwendener
Copy link
Owner

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!

@zachthedev
Copy link

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.

@zachthedev
Copy link

@oliverschwendener Any thoughts on my last comment?

@oliverschwendener
Copy link
Owner

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

@zachthedev
Copy link

@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?

@oliverschwendener
Copy link
Owner

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.

@waqashsn
Copy link

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.

@stefnotch
Copy link

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

Also, the workaround by waqashsn works beautifully well.

@laxu
Copy link

laxu commented Oct 22, 2020

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.

@oliverschwendener
Copy link
Owner

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

@laxu
Copy link

laxu commented Oct 23, 2020

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

I do, 120% custom scaling.

@oliverschwendener
Copy link
Owner

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.

@oliverschwendener
Copy link
Owner

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

@oliverschwendener
Copy link
Owner

Let's track this issue here: #515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants