Text input loosing focus after switching tabs (Google Docs)
-
Try it with
capture
also:["focus", "blur", "focusin", "focusout"].forEach(eventName => { document.documentElement.addEventListener(eventName, e => console.log(e), { capture: true }) });
There at least 2, sometimes as many as 6 focus related events on the
documentElement
in Vivaldi, whereas in Chrome I'm seeing none. -
I've disabled all extensions just to be on the safe side.
With that last snippet, here's what switching tabs twice looks like on my system:
Again, in Chrome, I'm seeing no output.
Are application (or operating system) level focus events supposed to generate DOM events at all? (does the W3C standard specify?)
There's a
visibilitychange
event, which should tell you about tab/window visibility - I'm not sure if the focus events should be firing or not.It looks like in Chrome they're not, so this might account for the difference in behavior at least.
-
@DoctorG any idea if the devs are reading this forum? this issue seems like a tough one and the information I posted might be helpful. If anyone's reading it.
It's kind of weird how they have no open bug tracker - even just a read-only view of their bug tracker would help avoid duplicate bug reports.
And only tarballs are published? I'm sure they have a point with this approach (saving resources, surfacing important issues by number of times the same issue gets reports) but it doesn't feel very "open source" - and they still have to read bug reports, and probably more duplicates than they'd get if we could check for dupes first.
Either way, I'm back to Chrome for now. I really want to leave, but every Chromium based project somehow turns out to disappoint in one way or another. I mean, if you want to compete with Google on Chrome, you have to at least ship a browser that properly runs Google's apps.
I would have liked to help, but it doesn't seem like help is wanted.
-
@mindplay Be so kind to report the issue to bug tracker.
You can reply to the report mail you received and add more information to help (f.ex. as attachments and text).
Thanks for helping us.
- - - -
Report issue to Vivaldi bug tracker. Once that is done, share the bug number (beginning with VB-). Thanks for helping us making Vivaldi better. -
@DoctorG done.
-
@mindplay Devs very rarely read here.
Please reply to report mail your received and add relevant information (which you wrote here) how you can help the dev and debug the issue!
Your answers by mail will be added automatically to bug tracker so the developer can read them. -
@mindplay VB-94958 "Focus problems in Google Docs" - Confirmed, no dev assigned.
-
When using google docs I've noticed several times that when I switch back to a tab with my open google docs and the cursor blinking and hit ctrl-v to paste some text that it doesn't paste. My current workaround is to hold down shift and the right arrow which selects blank text and then it allows me to paste.
I don't if this is a quirk of my setup but it works as expected in chrome. I have tried it in a new Vivaldi profile and I get the same behavior.
-
@browseruser Hi this is a known issue, see above. Been like this for a long time.
I have merged your topic into this one.
Please try to use the search feature before posting:
https://forum.vivaldi.net/search -
@Pathduck So it's an old issue (I have also noticed for a long time) but just now there is first bug report about it mentioned above VB-(94958 "Focus problems in Google Docs" )?
Or is there another bug report with a more updated status?
-
Seems like it's been a bug since at least 2018 https://forum.vivaldi.net/topic/75404/text-input-loosing-focus-after-switching-tabs-google-docs
Is there really no update on the status of this in almost 5 years?
-
It is not so easy to fix. Google scrambles and encrypts its HTML and JS code. Debugging is a hell with such broken site.
-
I found another site with focus problems.
https://www.thomann.de/dk/index.html
Try putting the cursor in the search input - it just loses focus after a moment.
No doubt this is the same issue - too many focus events, async requests are started, and then resolve in the wrong order.
You don't need to debug Google Docs or this site though - I've provided a simple script that shows what the issue is. There are too many focus events.
Most likely the extra events were introduced in a time before the newer tab events were introduced.
I haven't checked yet, but I wonder if Vivaldi even sends those newer events? If so, apps like Google Docs would most likely respond correctly to those events - and if it doesn't, it probably should send those events instead of the extra focus events.
Check which events Chrome sends for what activities: input focus, tab visibility, window focus - and make sure you send the same events.
This shouldn't be difficult to fix at all, now that you know what the issue is.
-
@mindplay said in Input focus issue (in Google Docs):
https://www.thomann.de/dk/index.html
Try putting the cursor in the search input - it just loses focus after a moment.No issue with the search field here for me, testing in a clean profile of 5.7 Stable, Win10. A "popup" appears where I can search. Maybe the content blocker is interfering?
I've provided a simple script that shows what the issue is.
Where it that script?
-
@Pathduck said in Input focus issue (in Google Docs):
I've provided a simple script that shows what the issue is.
Where it that script?
Pretty sure he provided the short script in https://forum.vivaldi.net/post/641001
-
Yeah, scroll up for the script snippet + explanation.
Regarding thomann.de - this might actually be an issue with Vivaldi for Android only. I tap the search input, it gets the focus for a second, and then the on-screen keyboard disappears. Could someone verify that, please?
(on my Windows desktop, I've reverted to Chrome because of the focus issue - I'm still using Vivaldi on Android though, because it's generally just better, and I don't use Google docs on my mobile.)
I assumed it's the same issue, since it's focus related, but I suppose these might be different issues.
-
@mindplay Yes can confirm this is a problem on Vivaldi for android but works fine on android chrome. Probably a separate issue for https://forum.vivaldi.net/category/147/vivaldi-for-android
-
@mindplay said in Input focus issue (in Google Docs):
this might actually be an issue with Vivaldi for Android only
Then please ask at https://forum.vivaldi.net/category/147/vivaldi-for-android
I guess such focus issues on Android and Windows are different.
-
-
Tabbing out and back into google docs and some other websites loses focus on typing and the cursor freezes. I have to click on the page to type again.