Side navigation
#969 closed bug (wontfix)
Opened February 16, 2007 06:20AM UTC
Closed March 31, 2008 02:12AM UTC
Last modified March 14, 2012 08:05PM UTC
className animation has incorrect RegExp declaration
Reported by: | jeffkretz | Owned by: | stefan |
---|---|---|---|
Priority: | minor | Milestone: | 1.1.3 |
Component: | interface | Version: | 1.1 |
Keywords: | className | Cc: | |
Blocked by: | Blocking: |
Description
In animating a className, the ifx.js defines a Reg Exp to find the style rule on line 395:
var rule = new RegExp('.' + prop[p] + ' {');
This works in IE and FF, but Opera throws an exception:
Statement on line 395: Reg Exp.prototype.compile: syntax error in pattern or string.
This appears to be because the Reg Exp declaration for Opera is more strict about backslash declarations to escape specific characters. The following change to the source code worked for me in IE6, IE7, FF and Opera:
var rule = new RegExp('\\.' + prop[p] + ' \\{');
Note that the backslash itself for the period and curly brace is then passed to the Reg Exp statement.
JK
Attachments (0)
Change History (1)
Changed March 31, 2008 02:12AM UTC by comment:1
description: | In animating a className, the ifx.js defines a Reg Exp to find the style rule on line 395:\ \ var rule = new RegExp('.' + prop[p] + ' {');\ \ This works in IE and FF, but Opera throws an exception:\ Statement on line 395: Reg Exp.prototype.compile: syntax error in pattern or string.\ \ This appears to be because the Reg Exp declaration for Opera is more strict about backslash declarations to escape specific characters. The following change to the source code worked for me in IE6, IE7, FF and Opera:\ \ var rule = new RegExp('\\.' + prop[p] + ' \\{');\ \ Note that the backslash itself for the period and curly brace is then passed to the Reg Exp statement.\ \ JK\ → In animating a className, the ifx.js defines a Reg Exp to find the style rule on line 395: \ \ var rule = new RegExp('.' + prop[p] + ' {'); \ \ This works in IE and FF, but Opera throws an exception: \ Statement on line 395: Reg Exp.prototype.compile: syntax error in pattern or string. \ \ This appears to be because the Reg Exp declaration for Opera is more strict about backslash declarations to escape specific characters. The following change to the source code worked for me in IE6, IE7, FF and Opera: \ \ var rule = new RegExp('\\.' + prop[p] + ' \\{'); \ \ Note that the backslash itself for the period and curly brace is then passed to the Reg Exp statement. \ \ JK \ |
---|---|
need: | → Review |
resolution: | → wontfix |
status: | new → closed |
Interface is no longer supported; consider switching to jQuery UI.