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

Invalid support.scrollboxSize() function result #4029

Closed
isukces opened this issue Mar 30, 2018 · 1 comment
Closed

Invalid support.scrollboxSize() function result #4029

isukces opened this issue Mar 30, 2018 · 1 comment
Assignees

Comments

@isukces
Copy link

@isukces isukces commented Mar 30, 2018

support.scrollboxSize() returns sometimes true and sometimes absolute value depending on browser zoom.

Problem was found on:

  • jquery 3.3.1,
  • Chrome 64bit ver. 64.0.3282.186 and 65.0.3325.181,
  • Windows 10 operating system, resolution 1920x1080, normal system font (100%),
  • Browser zoom : 90% and 110%.

chrome-jquery-problem

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    var sbs = $.support.scrollboxSize();
    var text = sbs==='absolute' ? "WRONG": "OK";
    alert("support.scrollboxSize() returns " + sbs + " so its " + text + ".");
});
</script>
</head>
<body>
    <p>Change font size in chrome with ctrl+wheel and reload page.</p>
</div>
</body>
</html>

Originally problem was found on Serenity framework serenity-is/Serenity#3412 .

@gibson042
Copy link
Member

@gibson042 gibson042 commented Mar 31, 2018

Confirmed. Similarly to #3808, zoom can apparently mess with offsetWidth even though it's not supposed to.

@gibson042 gibson042 self-assigned this Mar 31, 2018
gibson042 added a commit to gibson042/jquery that referenced this issue Mar 31, 2018
gibson042 added a commit that referenced this issue May 7, 2018
Fixes gh-4029
Closes gh-4030
GerHobbelt added a commit to GerHobbelt/jquery that referenced this issue Jul 3, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants