jQuery: The Write Less, Do More JavaScript Library

Ticket #2834 (new bug)

Opened 3 days ago

Last modified 2 days ago

UI resizables

Reported by: hedgomatic Assigned to: braeker
Type: bug Priority: major
Milestone: 1.2.4 Component: ui
Version: 1.2.3 Keywords: UI, Resizables
Cc: Needs: Review

Description

Resizables seems to have a problem dealing with elements in a parent who's display is set to none. Namely, it sets the css so that their height and width are zero.

Even calling it from an init() type function and repeating it after the new div is shown doesn't prevent this from happening. I think it's because it's using addClass to set the attributes of the element, thereby overwriting any attempt to explicitly declare it by redeclaring those properties afterwards.

the problem, at least on my export of just the resizable script, exists in this.helper.addClass, from line 249 to 256.

checking if the element has already declared its width and height via css and using those properties rather than outerWidth and outerHeight would probably solve the problem.

It may alternatively be a versioning conflict or something else, since outerWidth/Height seem to always return 0 or NaN for me. Can someone replicate this?

If not, perhaps changing this to type: feature and priority: trivial might be a good idea, as adding the class rather than checking if there are already existing css properties for the element seems like it'll create other flexibility problems using this in real-world scenarios.

Attachments

Change History

Changed 3 days ago by hedgomatic

sorry, that really was a painfully horrible and vague summary. My bug-reporting skills are rusty :]

Changed 2 days ago by paul

  • owner changed from paul to braeker
Note: See TracTickets for help on using tickets.