jQuery: Resizable Issue in FF - debug help needed
Please try the following in Firefox (my version: 3.6.12).
This was working and now it's not. IT does work in IE and it works in jsFiddle from w/in FF - I'm thinking an addon may be affecting it.Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
<link media="all" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css" rel="stylesheet" />
<style type="text/css" media="all">
.ui-resizable-e {right:0; background:#eee; z-index:1000;}
.ui-resizable-w {left :0; background:#eee; z-index:1000;}
#foo
{
background : #fff;
border : 1px solid #ccc;
margin : 0 auto;
padding : 1em;
text-align : left;
width : 75%;
}
</style>
<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var foo = $('#foo');
foo.resizable({
animate : true
, animateEasing : 'swing'
, handles : 'e,w'
, resize : function (event,ui){
ui.position.left = ui.originalPosition.left;
ui.size.width = ( ui.size.width
- ui.originalSize.width )*2
+ ui.originalSize.width;
}
});
});
</script>
</head>
<body>
<div id="foo"></div>
</body>
</html>
To reproduce the error:
- Grip one of the edges and resize the div (drag then release). Normally once this is done, the resize hook should be released开发者_开发知识库, however for me it is not.
- After unclicking the grip, I can click anywhere in the body (to the left/right of the grip) to resize the div.
I've included the full HTML (not lengthy) of my test page above. All the css and script is linked to google's libraries.
I just tried it in Firefox 3.6.12, all works fine - I can grip, move, when I release, it resizes. There's no "hanging release" issue that you mention.
Why don't you start it in safe mode (firefox --safe-mode
) to test without addons?
I believe the problem exists in the FireQuery v0.8 add-on to Firebug v1.5.4.
Specifically, I found turning jQuery Lint
off in the console no longer produced the error above.
Please comment if you are able to reproduce the error.
精彩评论