adityapooniya / base2

Automatically exported from code.google.com/p/base2
0 stars 0 forks source link

removeClass leaves extra spaces #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The behavior of removeClass is inconsistent across browsers:

elem.className = 'removeme someclass';
base2.DOM.bind(elem);
elem.removeClass('removeme');
alert(elem.className.length);

Output in Firefox  -> 9
Output in IE/Opera -> 10

This happens because Firefox automatically trims classes while IE+Opera
don't. Not a big deal, but I'd suggest removeClass be modified to trim the
string before assigning the className.

Test case: 
http://wforms.googlecode.com/svn/trunk/sandbox/base2-removeClass.html

Original issue reported on code.google.com by cedric.s...@gmail.com on 31 Dec 2007 at 3:50

GoogleCodeExporter commented 9 years ago
This is pretty easy to fix. Not sure that it is actually worth it but I'll 
still do it.

Original comment by dean.edw...@gmail.com on 2 Jan 2008 at 1:45

GoogleCodeExporter commented 9 years ago
Fixed in 1.0 beta 2.

Original comment by dean.edw...@gmail.com on 6 Jan 2008 at 9:36