Page causes Vivaldi to zoom out to 25% - bug in Vivaldi or my code?
-
Super strange bug:
I have created a website with a form to upload a file. Form submission is normal POST (not ajax).
When I click the submit button (submitting to action URL), the page I'm shown after server processing appears zoomed far out! But the zoom slider in Vivaldi still show 100%, but when press CTRL+mouse up, it zooms in and slider now says 28% (indicating it was not really 100% before, but rather 25%).
Of course, I spent some time debugging this since I wrote the website code, but AFAIK, a web site shouldn't be able to control the zoom level of a Vivaldi tab? Is that correct?
I reported this as a bug years ago, but it's still not fixed, and I've only seen it happen on my own web page, which of course made me think it's a bug in my code.
EDIT: Issue seems to be related to embedding of PDF files. Should be possible to reproduce issue like this:
- Go to: https://plugins.krajee.com/file-basic-usage-demo
- Load a PDF file in Basic Example 1, and wait for the preview to load.
- Reload the page.
- The page is now zoomed at 25% (for me at least).
-
@GeeZuZz said in Page causes Vivaldi to zoom out to 25% - bug in Vivaldi or my code?:
I reported this as a bug years ago
Which VB-xxxxx bugnumber did you have got?
-
@GeeZuZz Hi, do you have a basic test case for this issue?
I think for instance this is as basic as it gets when it comes to form submission, and I certainly don't get any change of zoom there:
https://pathduck.github.io/test/login/
So something must be going on with you code, and you'll need to share something, otherwise it's impossible to guess what the problem is.Also, have you tested in other browsers?
And in a clean profile? -
@DoctorG unfortunately I don't have the bug number... I know the email I submited from though...
@Pathduck I tested in Edge, not happening there.
Also confirmed it is happening in a new Private window (also with extensions disabled).I don't think I'll be able to make a basic sample to recreate it, I have like 20 different forms on my site, and it only happenes on one specific - extremely strange!
And it's an internal company site, so I can't share itAnyway, this is not a big problem, more of a curiousity, and I guess I just want to confirm for my own peace of mind that it's not my code's fault: Because it shouldn't be possible to change zoom level?
-
@GeeZuZz Please check if that happens if you disable JavaScript for the page. The some JS code causes these weird zooms.
-
@GeeZuZz said in Page causes Vivaldi to zoom out to 25% - bug in Vivaldi or my code?:
Because it shouldn't be possible to change zoom level?
Well yes, it shouldn't be - but that's what bug testing is for, to find bugs and report them so they can be fixed.
If no-one else can reproduce this and you can't share the code or make a basic test case available, I'm afraid there's little to be done.
Is your code doing something special, maybe a lot of redirects?
Maybe examine the network log in devtools while the upload is being done, to see if there's any differences between how browsers handle it?When you say Edge, do you mean new Chromium-based Edge or the old one? Have you tested in other Chromium-based browsers?
Here's a really basic test case for file uploads, and it does not change zoom level:
https://cgi-lib.berkeley.edu/ex/fup.html -
@GeeZuZz said in Page causes Vivaldi to zoom out to 25% - bug in Vivaldi or my code?:
I have created a website with a form to upload a file.
Can you please report issue to Vivaldi tracker, describe steps how to reproduce, create a testcase page and add the URL to report? I would like to test your issue.
-
I made some updates to my previous post...
I meant Edge Version 105.0.1343.42, I'm assuming it's Chromium.
There's no special javascript or any redirects etc, except for the input form itself, which is using this: https://plugins.krajee.com/file-input - but I don't understand how that can cause it, because the issue happens AFTER it's submited (at the form action URL). I'm also pretty sure I have some other forms using the same library, where it doesn't happen.
If I disable javascript the form won't work.
Edit: I disabled javascript after loading the page so it loaded the form correctly, and when I submited it, the page loaded zoomed out with javascript disabled.Edit2: I can confirm it does not happen when I disable the mentioned library and put a normal submit button instead. But I use that library other places too, without the issue, so don't think it can be recreated easily.
-
@GeeZuZz Doe these demos https://plugins.krajee.com/file-basic-usage-demo have the zoom issue with your Vivaldi?
-
@GeeZuZz I remember some issues with company software in 2020 (i do not remeber correct) where the software was not up-to-date.
Was it this report from 2021?
VB-77581 "Browser changes zoom to about 20% after a redirect" - Can not reproduce.Which Vivaldi do you use?
Which CRM software is this? -
@DoctorG It could be that bug report yes - my email is: [email protected]
I use v5.4.2753.47 of Vivaldi (but this has happened for years, long before I submited the bug). I would guess it's more than 3 years since I first saw it.Just as I thought this bug couldn't get any weirder, I notice that the issue only happens when I upload a PDF, not when uploading other extensions.
I'm guessing there must be something about the preview rendering of PDFs that freaks out Vivaldi.The demos you linked won't work since it doesn't let you submit. But if the bug is already happening with the preview, you can try to pick a PDF and see if something happens.
Unfortunately I'm going have to jump out of this rabbit hole now.
Like I mentioned, this bug isn't really that big of a problem, I was mostly curious if it was my code that caused it. I guess what I learned today was it was not my code, but rather the file upload library I used, and it's probably a bug in Vivaldi, not the javascript.
-
@GeeZuZz said in Page causes Vivaldi to zoom out to 25% - bug in Vivaldi or my code?:
I notice that the issue only happens when I upload a PDF
Zoom on embedded PDFs and Vivaldi can cause different effects when using mouse or slider.
We have some related bug reports. No progress -
@DoctorG
I thought the preview was just an image, but just now realized that the file upload script actually seem to have the actual PDF loaded and drawn by the browser as a preview. So yeah, it seems to be related to embedding of PDF then - but the issue doesn't happen until page is refreshed after the PDF was loaded.Should be possible to reproduce issue like this:
- Go to: https://plugins.krajee.com/file-basic-usage-demo
- Load a PDF file in Basic Example 1, and wait for the preview to load.
- Reload the page.
- The page is now zoomed at 25% (for me at least).
-
@GeeZuZz Thanks for this, i can reproduce it!
Good find
I will report to bug tracker.VB-91809 Reload of page with embedded PDF breaks page zoom - Confirmed.
-
@DoctorG Strange issues here as well, when playing around with zooming page and reloading.
https://pathduck.github.io/test/pdf/Setting PDF zoom will also change page zoom level after reload. And using Ctrl + scroll wheel behaves strangely.
So I'm guessing these things are related.
-
@Pathduck said in Page causes Vivaldi to zoom out to 25% - bug in Vivaldi or my code?:
Setting PDF zoom will also change page zoom level after reload. And using Ctrl + scroll wheel behaves strangely.
Different bug. But already known in bug tracker.
So I'm guessing these things are related.
Yes, i think, these are related ones.
Thanks for your tests!