I have a text field that I configured to drag and drop, but it isnβt ... The browsers I tested (FireFox 3 and Safari 3 on OS X) believe that I am trying to select text inside a text field (even if they are not).
I would like to allow a click inside the text box to place the cursor for editing, but the drag and drop movement should be handled by jquery-ui.
An html example that does not do what I want below ...
<html>
<head>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript">
$(function(){
$("div").draggable();
$("textarea").draggable();
});
</script>
<style type="text/css">
div {
position: fixed;
top: 100px;
left: 100px;
width: 100px;
height: 100px;
background-color: blue;
}
textarea {
width: 80%;
height: 80%;
background-color: yellow;
resize: none;
}
</style>
</head>
<body>
<div>
<textarea>Pirates spotted!</textarea>
</div>
</body>
</html>
source
share