Skip to content
Browse files

adding missing semicolon, and a little comment

adding missing semicolons in the spec, and a little comment on the fix.
  • Loading branch information...
1 parent 4a18190 commit 78992b8833d244c5121444398ae89437aba4861a Cristian Carlesso committed Jul 30, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −1 Source/Element/Element.js
  2. +4 −3 Specs/1.4client/Element/Element.js
View
2 Source/Element/Element.js
@@ -821,7 +821,7 @@ Element.implement({
var oldID;
/*<ltIE8>*/
if (Browser.ie6 || Browser.ie7 && !keepid){
- oldID = this.removeAttribute('id');
+ oldID = this.removeAttribute('id'); //if element has ID, IE6/7 will break document.id
}
/*</ltIE8>*/
var clone = this.cloneNode(contents), ce = [clone], te = [this], i;
View
7 Specs/1.4client/Element/Element.js
@@ -9,6 +9,7 @@ provides: [Element.Event.Specs]
describe('Element', function(){
describe('Element.getProperty', function(){
+
it('should cloneNode properly on IE6/7', function(){
var div = new Element('div');
div.innerHTML = "<input id='Q1' class='foo' rel='hai' />​";
@@ -21,10 +22,10 @@ describe('Element', function(){
var clone = q1.clone();
clone.replaces(q1);
- expect($$('input[id=Q1]').length).toEqual(0)
- expect($$('input#Q1').length).toEqual(0)
+ expect($$('input[id=Q1]').length).toEqual(0);
+ expect($$('input#Q1').length).toEqual(0);
clone.dispose();
- })
+ });
it('should get the attrubte of a form when the form has an input with as ID the attribute name', function(){
var div = new Element('div');

0 comments on commit 78992b8

Please sign in to comment.
Something went wrong with that request. Please try again.