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 #2100. Element.erase caused unexpected values for the attributes #2140

Merged
merged 2 commits into from Nov 29, 2011

Conversation

ibolmo
Copy link
Member

@ibolmo ibolmo commented Nov 28, 2011

Added a feature detect if the browser sets 'null' instead of null in the
attribute.

Added a Element.Property for class.

TESTED: Opera 11, Safari 5, Firefox 3-5, 8, 10, Chrome latest, IE6-9.

…ment.get the unexpected results.

Added a feature detect if the browser sets 'null' instead of null in the
attribute.

Added a `Element.Property` for class.

TESTED: Opera 11, Safari 5, Firefox 3-5, 8, 10, Chrome latest, IE6-9.
@ibolmo
Copy link
Member Author

ibolmo commented Nov 28, 2011

Fixes #2100.

@@ -863,6 +868,20 @@ Element.Properties.style = {

};

if ('className' in document.documentElement){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would this be false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I thought it strange too, but as you noticed in L557, we still check against it.

@ibolmo
Copy link
Member Author

ibolmo commented Nov 28, 2011

Removed unnecessary Element.Properties.class and opted to use
propertySetter and getter. Adding for condition to set the value to ''
instead of null (IE would set to 'null').

Refactored setProperty. Now much simpler. Checks for propertySetter and
assumes it'll take responsibility in cleaning up the value (and to set
it). Still removeAttribute if no setter, and value is null. Passes all
specs, and therefore, it's backwards compatible.

PASSED: IE6-9, FFx 3-5, 8, 10, Chrome latest, Safari 5, Opera 11.
@ibolmo
Copy link
Member Author

ibolmo commented Nov 29, 2011

Naice. Looks like this fixes #2108 as well

cpojer added a commit that referenced this pull request Nov 29, 2011
Fix #2100. Element.erase caused unexpected values for the attributes
@cpojer cpojer merged commit edb0324 into mootools:master Nov 29, 2011
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.

None yet

2 participants