Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Scroll issue in Form.Validator.Inline.validateField() #250

Open
wants to merge 1 commit into from

2 participants

@stipsan

Fixing issue where scrollToErrors didn't work if the scrollbar is set on the form element instead of its parent.

@arian
Owner

Do you have a jsfiddle where it fails. Makes it a little bit easier for me to test, so I can pull this quickly :)

@stipsan

Here: http://jsfiddle.net/KPGUw/3/

Just comment out the pasted in Form.Validator.Inline to see it fail.

@daKmoR daKmoR referenced this pull request from a commit
@csuwildcat csuwildcat Fixes #250 - Binds mutator overwrites previous binds
https://mootools.lighthouseapp.com/projects/24057/tickets/250

* Added fix for allowing Binds that persist through the prototype chain when Classes are extended (Daniel Buchner)
* Added specs for this (Aaron Newton)
559f824
@arian
Owner

Could you elaborate, it has the same behavior for me.

@stipsan

Sure, here's a quick screencast showing you both the failing behavior, and the correct one: http://cl.ly/1c2o1K152H0X2x441O1E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 9, 2011
  1. @stipsan

    Fixing issue where scrollToErrors didn't work if the scrollbar is set…

    stipsan authored
    … on the form element instead of its parent.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Source/Forms/Form.Validator.Inline.js
View
2  Source/Forms/Form.Validator.Inline.js
@@ -159,7 +159,7 @@ Form.Validator.Inline = new Class({
var result = this.parent(field, force);
if (((this.options.scrollToErrorsOnSubmit && scroll == null) || scroll) && !result){
var failed = document.id(this).getElement('.validation-failed');
- var par = document.id(this).getParent();
+ var par = document.id(this);
while (par != document.body && par.getScrollSize().y == par.getSize().y){
par = par.getParent();
}
Something went wrong with that request. Please try again.