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

Sites like Google Translate exit insert mode while typing #3596

Closed
bheadmaster opened this issue Feb 13, 2018 · 39 comments · Fixed by #4723
Closed

Sites like Google Translate exit insert mode while typing #3596

bheadmaster opened this issue Feb 13, 2018 · 39 comments · Fixed by #4723
Labels
bug: behavior Something doesn't work as intended, but doesn't crash. component: keyinput Issues related to processing keypresses. component: QtWebEngine Issues related to the QtWebEngine backend, based on Chromium. priority: 0 - high Issues which are currently the primary focus.

Comments

@bheadmaster
Copy link

Steps to reproduce:

  • open https://translate.google.de/
  • press i to enter insert mode
  • type a in the textbox

Behavior I see: Browser exists insert mode immediately even though esc was not pressed.
Expected behavior: Browser stays in insert mode.

Can someone also test this, please? Only seen this happen on google translate though. Same thing happens when opening https://translate.google.de/#de/en/ instead of https://translate.google.de/ .


Version info

qutebrowser v1.1.1
Git commit:
Backend: QtWebEngine (Chromium 61.0.3163.140)

CPython: 3.6.4
Qt: 5.10.0
PyQt: 5.10

sip: 4.19.7
colorama: no
pypeg2: 2.15
jinja2: 2.10
pygments: 2.2.0
yaml: 3.12
cssutils: no
attr: 17.4.0
PyQt5.QtWebEngineWidgets: yes
PyQt5.QtWebKitWidgets: no
pdf.js: no
sqlite: 3.22.0
QtNetwork SSL: OpenSSL 1.1.0g 2 Nov 2017

Style: QFusionStyle
Platform: Linux-4.15.2-2-ARCH-x86_64-with-arch, 64bit
Linux distribution: Arch Linux (arch)
Frozen: False
Imported from /usr/lib/python3.6/site-packages/qutebrowser
Qt library executable path: /usr/lib/qt/libexec, data path: /usr/share/qt

Paths:
cache: /home/lark/.cache/qutebrowser
config: /home/lark/.config/qutebrowser
data: /home/lark/.local/share/qutebrowser
runtime: /run/user/1000/qutebrowser
system data: /usr/share/qutebrowser

Uptime: 0:01:31

@qutebrowser-bot qutebrowser-bot added bug: behavior Something doesn't work as intended, but doesn't crash. component: keyinput Issues related to processing keypresses. component: QtWebEngine Issues related to the QtWebEngine backend, based on Chromium. labels Feb 13, 2018
@jgkamat
Copy link
Member

jgkamat commented Feb 13, 2018

Hmm, I can't seem to reproduce this on my machine (qt5.7.1). Maybe this is one of the 5.10 bugs though?

@The-Compiler
Copy link
Member

It's most likely caused by #3427 as workaround for #3401 (indeed on Qt 5.10 only) - cc @Ryan-Farley. Not sure if there's anything we can do without breaking that workaround, though.

@The-Compiler The-Compiler added priority: 1 - middle Issues which should be done at some point, but aren't that important. qt: 5.10 labels Feb 13, 2018
@The-Compiler
Copy link
Member

Wait, I can't actually reproduce this on Qt 5.10 either. Does the statusbar still say "-- INSERT MODE --"?

@The-Compiler The-Compiler added the status: can't reproduce Issues which can't be reproduced. label Feb 13, 2018
@gebulmer
Copy link
Contributor

I could only get it to trigger once, @The-Compiler and @jgkamat can you press 'i' as soon as you see the cursor in the box and then immediately mash letter keys? I think it happened as the x appeared in the box there, which requires timing.

I could be wrong though

@bheadmaster
Copy link
Author

Weird. It happens for me every time, even if I let the page load completely and wait for a bit before entering insert mode.

Here's screenshots of what I see:
https://imgur.com/a/jDDuV

@bheadmaster
Copy link
Author

Here's my debug log of starting qutebrowser, reproducing the bug, and closing, if it's of any help.
https://pastebin.com/EBEe8Jur

16:58:11 is when I pressed i
16:58:13 is where I entered the a into the textbox triggering the bug.

@bheadmaster
Copy link
Author

16:58:13 DEBUG destroy lineparser:_after_save:81 Saved to /home/lark/.local/share/qutebrowser/cmd-history
16:58:13 DEBUG webview browsertab:_set_load_status:692 load status for <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=0 url='https://translate.google.de/'>: LoadStatus .loading
16:58:13 DEBUG signals signalfilter:_filter_signals:86 emitting: cur_load_status_changed('loading') (tab 0)
16:58:13 DEBUG signals signalfilter:_filter_signals:86 emitting: cur_load_started() (tab 0)
16:58:13 DEBUG modes modeman:leave:296 Leaving mode KeyMode.insert (reason: load started)

This part seems relevant - this is what happened when I entered a character in the textbox, I think. I apologize if I am spamming.

@The-Compiler The-Compiler removed the status: can't reproduce Issues which can't be reproduced. label Feb 13, 2018
@The-Compiler
Copy link
Member

Thanks! I was able to reproduce it once as well.

@lrvick
Copy link

lrvick commented Jun 6, 2018

Hitting this on 2 machines. Impacts google docs and a number of other textareas. Does not seem to impact all textareas though, as this github input box works fine, but google docs in another tab is unusable.

@duran
Copy link

duran commented Jun 7, 2018

It happes to me too when translate "refresh" the translation. If I turn off instant translation the problem dissapears.

@teon
Copy link

teon commented Jun 7, 2018

I will add that I have not only issues with Google (gmail/docs) but also GitLab.

Also some pages are "refreshing" in a loop... I cant even enter insert mode...

@jgkamat
Copy link
Member

jgkamat commented Jun 7, 2018 via email

@Aster89
Copy link
Contributor

Aster89 commented Jul 26, 2018

This problem is annoying me as well; if it is of any relevace, in Google Maps I experience the problem (i.e. back to command mode without pressing Esc) only when I empty the search box.

  1. hit i to enter insert mode in the search box of Google Maps
  2. write something (insert mode is correctly kept on)
  3. hold Shift and press Home to select everything was typed at step 2.
  4. turning point
    a. type something else results in correct behavior (insert mode is not left and further typing fills the box with new text)
    b. pressing either Backspace or Delete results in wrong behavior (insert mode left and further typing results in undesired commands)

@spejamchr
Copy link

Something similar happens on https://caniuse.com when searching: Type some letter in the search field, and after a pause the browser exits insert mode.

@The-Compiler The-Compiler added priority: 0 - high Issues which are currently the primary focus. and removed priority: 1 - middle Issues which should be done at some point, but aren't that important. labels Jul 31, 2018
@lockeadams
Copy link

This issue is still affecting me, any updates?

@The-Compiler
Copy link
Member

@lockeadams so far nobody has looked at it, and the Qt bug behind it still isn't fixed as far as I know. If there are updates, subscribing to the issue is the best way to know about them.

@jgkamat
Copy link
Member

jgkamat commented Sep 7, 2018

Just to increase visibility, please go vote for QTBUG-65223. I'm pretty surprised it's not fixed yet :(

@teto
Copy link

teto commented Oct 15, 2018

It's especially visible on https://www.apertium.org/index.eng.html, it seems QB leaves (then reenters) insert mode regularly (every 500ms) so if you type fast you can actually send a command to QB instead of type some text. (qt 4.11, Qb 1.4.2, will try with the latest one when I get the opportunity).

@takedawilliam
Copy link

if you turn off "Auto translate" feature in Google Translate, you can continue typing in Insert Mode without interruption.

@void-m4110c
Copy link

if you turn off "Auto translate" feature in Google Translate, you can continue typing in Insert Mode without interruption.

How would you turn that off?

@robertp-indeed
Copy link

There's several pages that cause this issue for me; I've largely figured out what they are at this point so I just use passthrough mode on them now. It's an okay, though slightly clunky, workaround.

@rcorre
Copy link
Contributor

rcorre commented Feb 1, 2019

@robertp-indeed thanks for mentioning that, I didn't even think of trying passthrough mode! It isn't ideal, but it is better than pressing i after every letter (which is what I've been doing, no joke 😆)

@Yrds
Copy link

Yrds commented Mar 15, 2019

Maybe i am little late, but input.insert_mode.leave_on_load was not mentioned in this issue yet, setting it to false fix the problem without having to turning passive mode on.

@void-m4110c

This comment has been minimized.

@The-Compiler

This comment has been minimized.

@void-m4110c

This comment has been minimized.

@jgkamat

This comment has been minimized.

@void-m4110c

This comment has been minimized.

@prosoitos
Copy link
Contributor

prosoitos commented May 2, 2019

I had the same problem on https://melpa.org/#/, but input.insert_mode.leave_on_load to False solved it.

Thanks @Yrds!

@mathieufrh
Copy link

I can confirme that input.insert_mode.leave_on_load = False helps a lot!

@The-Compiler
Copy link
Member

This should mostly be solved nowadays (via #4723) by exiting insert mode when a page finished loading. I wrote an explanation of what's going on for Reddit, here it is:

The main problem here is QTBUG-65223 which means that QtWebEngine (since Qt 5.10) emits its loadStarted signals whenever a page changes its URL via JavaScript (which can commonly happen while typing on pages like Google Translate). So qutebrowser can do one of these things:

  • Leave insert/hint mode when a page load started - but then it'll also leave it e.g. when typing on Google Translate, which was a bug for a long time.
  • Leave insert/hint mode when a page load finished (like it does now).
  • Don't leave them at all (which you can do via the input.insert_mode.leave_on_load and hints.leave_on_load settings). This tends to be rather confusing - when you e.g. enter a search term on Google and press enter, you probably wouldn't expect to still be in insert mode.

I wish there was a better solution (or that bug would finally get fixed) - but so far, I haven't been able to think of one.

@prosoitos
Copy link
Contributor

Thank you for this comment. I had not realized that the issue had been fixed and closed and that I could stop having input.insert_mode.leave_on_load set to false (which, while solving the problem, was indeed confusing).

@nrdxp
Copy link
Contributor

nrdxp commented Sep 19, 2022

Unfortunately this is still an issue for me even with input.insert_mode.leave_on_load = False using latest qt6-v2 branch and qt6 6.3.1.

@The-Compiler
Copy link
Member

@nrdxp Works fine for me. Please open a new issue with the information from the template and detailed reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: behavior Something doesn't work as intended, but doesn't crash. component: keyinput Issues related to processing keypresses. component: QtWebEngine Issues related to the QtWebEngine backend, based on Chromium. priority: 0 - high Issues which are currently the primary focus.
Projects
None yet
Development

Successfully merging a pull request may close this issue.