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

fix scroll bug is page is using SVG #1331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmitrydvorkin
Copy link

par.getSize().y gives float after More >= 1.5.1 and SVG is used on the page so code can't find document.body and can't scroll

…e page so code can't find document.body and can't scroll
@SergioCrisostomo
Copy link
Member

@dmitrydvorkin thank you for sending a fix suggestion!
Could you make a jsFiddle with a example of the problem please?

Cheers

@dmitrydvorkin
Copy link
Author

@SergioCrisostomo
Copy link
Member

@dmitrydvorkin thank you! Could you guide me in that page and explain what I should do to get the wrong behaviour? (if possible to remove the extra HTML not relevant to the problem would be awesome!)

@dmitrydvorkin
Copy link
Author

simple: just try to press submit button at the end of the page.
by default Form.Validator.Inline have to scroll page to the first empty field. It will not scroll.
It's a wrong behaviour.
if you'll debug line 5554 of More you'll see that par.getSize().y != par.getScrollSize().y for any DIVs wrapping this form because getSize().y is float for THIS page (it linked to svg images).

by my humble opinion condition "par.getSize().y != par.getScrollSize().y" is not really needed bacause in most cases you'll need to scroll whole document, not the DIV with overflow-y enabled.

in other case (you need to scroll DIVs) problem too complex and I can't offer the solution to mootools developers.

@dmitrydvorkin
Copy link
Author

also you may see that width of some images is not integer. It's my designer requirement and it's allowed in css.

@SergioCrisostomo
Copy link
Member

@dmitrydvorkin thank you for feedback.

I would like to make a example that we can use as a test case, so we can make tests for it and fix the problem. Something like this: http://jsfiddle.net/9ezmb51z/ If you have the time would be great if you can adapt that jsFiddle to reproduce the problem. It has Form.Validator.Inline it has a svg but it scrolls fine. If you can adapt that simple version to show the wrong behaviour, it would be great.

Thank you!

@dmitrydvorkin
Copy link
Author

look:
http://jsfiddle.net/9ezmb51z/1/

I just added <h2>sdsd</h2> between two required fields and
par.getSize().y gives me float value while par.getScrollSize().y gives integer.

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

Successfully merging this pull request may close these issues.

2 participants