sidewinderlabs / backplanejs

Other
12 stars 3 forks source link

Calls to UX.addClassName when on FF in XHTML mode, cause a script error #101

Closed backplane-import closed 13 years ago

backplane-import commented 13 years ago

Imported from backplanejs Google Code issue 101.

Reporter markbirbeck
Date 10 Sep 2010 1:32:34 AM UTC

What steps will reproduce the problem?

  1. Run a form with a select1.
  2. Move the mouse over the select1.

What is the expected output? What do you see instead? If Firebug is open there should be no errors. Instead we get an error each time the mouse is moved:

String contains an invalid character" code: "5 element.classList.add(classString);


Priority: Medium Type: Defect

backplane-import commented 13 years ago

Comment by markbirbeck on 10 Sep 2010 1:33:14 AM UTC

Anton has established that the error is caused by the space character in the call to addClassName, in the StyleHoverishly() method (in eventTargetProxy.js).


Updates

Owner set to creaven

Ticket status set to FixPending

backplane-import commented 13 years ago

Comment by markbirbeck on 10 Sep 2010 3:19:55 AM UTC

Turns out that the space character is not the problem, since the UX.addClassName() method is designed to take spaces into account. Instead the problem is that the code is using a non-existent error code. Instead of this (in UXUtils.js):

if (e.code != e.NS_ERROR_DOM_INVALID_CHARACTER_ERR) throw e;

we should have this:

if (e.code != e.INVALID_CHARACTER_ERR) throw e;

Thanks to Anton for the pointer, though.


Updates

Owner set to markbirbeck

backplane-import commented 13 years ago

Comment by markbirbeck on 10 Sep 2010 3:42:04 AM UTC

Added regression test in ra343e3b9e21c5723a5b992b234529a043855654e.

backplane-import commented 13 years ago

Comment by markbirbeck on 10 Sep 2010 5:14:38 AM UTC

This issue was closed by revision f89c5de2cd5a9f754d94be5dbb6bf8e1c7c9ff16 (originally 8cc27d4002).


Updates

Ticket status set to Fixed