Ticket #3176 (reopened bug)
Buggy behavior when trying to make an iframe resizable
| Reported by: | zibaldon@… | Owned by: | eduardo |
|---|---|---|---|
| Priority: | major | Milestone: | 1.next |
| Component: | ui.resizable | Version: | 1.5.2 |
| Keywords: | resizable iframe handle resize | Cc: |
Description
When you create an iframe and make it resizable, it has a strange behavior when you try to make it bigger and then smaller. I'll post a code example to make it clear.
You have to create 2 files
Main.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Resizable iframe example</title>
<script src="http://code.jquery.com/jquery-latest.js">
</script>
<script src="http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js">
</script>
<script src="jquery.ui.all.js">
</script>
</head>
<body>
<div id="divFrame" style="width:250px; height:200px">
<iframe id="ChildFrame" name="ChildFrame" src="child.htm" style="width:100%; height:100%">
</iframe>
</div>
<script type="text/javascript">
$("#divFrame").resizable({
handles: 'all'
})
</script>
</body>
</html>
and Child.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Child</title>
</head>
<body>
<div id="justAnElement" style="background-color:yellow; width:150px; height:100px; border-style:solid; border-color:black;">
<div id="HeaderTitle" style="background-color:red; ">
Try to resize the iframe
</div>
Make it bigger and then smaller
</div>
</body>
</html>
Now try to resize the iframe, make it bigger and then smaller moving the mouse quite fast. You'll notice that the handle of the iframe keep being dragged even if you release the mouse button, besides when trying to make the iframe smaller the handle isn't dragged if the pointer is on the iframe's surface. This happens on Firefox 3.0.1, IE 7 and Safari 3.1.2
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/nologo.gif)