Search and Top Navigation
#6680 closed bug (notabug)
Opened November 22, 2010 10:57AM UTC
Closed November 22, 2010 01:27PM UTC
Last modified November 22, 2010 01:43PM UTC
resizable doesn't work on img elements if the size attributes aren't used
Reported by: | dukegriffin | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.resizable | Version: | 1.8.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This problem only occurs on Chrome and Safari (so presumably webkit). I am using Mac OS X 10.6.5 with Chrome 7.0.517.44 and Safari 5.0.2. I have tested this with 1.8.6 and 1.7.3 to find the same results, so I'm guessing it may be a change in webkit..?
Unless height and width are specified on an img element, then setting it as resizable will make them 0 and the image will not be displayed. For example, this javascript should make an element resizable
$('.resizable-image').resizable();
but will NOT work as expected with this HTML
<img class="resizable-image" src="hawk.jpg"></img>
It will however work if I were to give it a size attribute like so
<img class="resizable-image" src="hawk.jpg" style="width: 500px; height: 500px;"></img>
This sounds like you're trying to make the image resizable before the image has actually loaded.