Skip to main content

Search and Top Navigation

#2893 closed bug (fixed)

Opened May 18, 2008 04:27AM UTC

Closed May 21, 2008 02:52AM UTC

Last modified February 26, 2009 12:09PM UTC

UI Resizables don't work with canvas tag

Reported by: nostrademons Owned by: eduardo
Priority: minor Milestone: 1.5
Component: ui.core Version: 1.2.3
Keywords: resizable, canvas Cc:
Blocked by: Blocking:

This may be invalid, but I'm reporting it anyway so a decision can be made about whether there's a possible fix or if it should just be documented.

UI Resizables don't work with the canvas tag. Problem is that Resizable adds its handles as child elements, but children of a canvas tag are interpreted as fallback content and not rendered if the browser can successfully render the canvas. A similar problem will occur with any other element that uses its content as a fallback, eg. script, applet, or object, but I can't imagine a situation where someone would want to apply Resizables to any of those. Would it also occur if you try to make an element that doesn't take content (eg. image) Resizable?

A workaround for client code is to wrap the canvas in a div and apply the resizable to the div - you can still draw on the canvas as normal, and use a stop handler on the Resizable to adjust its width/height and rerender it when resized.

Attachments (0)
Change History (4)

Changed May 20, 2008 07:15PM UTC by braeker comment:1

owner: paulbraeker

Changed May 21, 2008 02:52AM UTC by braeker comment:2

resolution: → fixed
status: newclosed

Changed May 24, 2008 03:39AM UTC by comment:3

milestone: 1.2.4

Milestone 1.2.4 deleted

Changed February 26, 2009 12:09PM UTC by paul comment:4

milestone: → 1.5