Skip to main content

Bug Tracker

Side navigation

#1458 closed bug (wontfix)

Opened August 03, 2007 12:57AM UTC

Closed March 31, 2008 01:47AM UTC

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) {

Attachments (0)
Change History (1)

Changed March 31, 2008 01:47AM UTC by scott.gonzal comment:1

resolution: → wontfix
status: newclosed

Interface is no longer supported; consider switching to jQuery UI.