Opened 16 years ago
Closed 15 years ago
#1458 closed bug (wontfix)
iResizeable moveDrag() ignores valid user defined onDrag array return value
Reported by: | ednark | Owned by: | stefan |
---|---|---|---|
Priority: | major | Milestone: | 1.1.4 |
Component: | interface | Version: | 1.1.3 |
Keywords: | iResizeable onDrag Array | Cc: | |
Blocked by: | Blocking: |
Description
Problem is in iResizeable.js inside function jQuery.iResize.onMove(). Line 92 returns the value of a user defined function. Line 93 checks to see if it is an array. In Firefox 2.0.0.6 on Ubuntu Linux 7.04 line 93 always FAILS as 'typeof newPos' sees all arrays as 'Object' and never 'Array'.
var a = new Array()
OR
var a = [1,2]
typeof a == 'Object'
a.length == 2
Fix is to just check for newPos.length as that is good enough to recognize an array in such a simple restricted case as this.
Line 92:
var newPos = JQuery.iResize.dragged.resizeOptions.onDrag.apply(jQuery.iResize.dragged, [newLeft, newTop]);
Bugged Line 93:
if (typeof newPos == 'array' && newPos.length == 2) {
Fixed Line 93 :
if (newPos.length == 2) {
Interface is no longer supported; consider switching to jQuery UI.