Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8393051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:41:10+00:00 2026-06-09T19:41:10+00:00

The code works on Chrome and I am trying to get the code to

  • 0

The code works on Chrome and I am trying to get the code to work on ie9. It works properly with the draggable() without containment but messes up the behavior badly when containment is set to parent:

img = $("<img alt='Preview' id='preimg' src='" + data.result.url +"' />")
$('#preimage').append(img);
$('#preimage').resizable({
                    'aspectRatio':true,
                    'handles':"all",
                    'autoHide':true,
                     containment: "parent"
                }).draggable({
                            containment: "parent"
                        });

The parent position is set to relative. I am using jquery 1.7.2 and jquery-ui 1.8.20
Is there any workaround?

EDIT

After much testing – I have found that the container size calculation for the div is not working correctly, I was able to get it to work with the resizable enabled but without actually resizing the div. As soon as I resize the draggable containment area reduces in size, resizing multiple times leads to this area becoming smaller until the drag option stops working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:41:12+00:00Added an answer on June 9, 2026 at 7:41 pm

    I found that there are several bug reports with the jquery ui library about these issues – http://bugs.jqueryui.com/report/10?P=resizable

    I was able to find a work around that I tested extensively and which should work in most situations. The key here is that you need to use a container div that is not floated and has position relative. If you need to use a floated/absolute div just create a div inside it and set the position to relative. For the code in the question the html looks like:

    <div class="outer"> 
        <div class="container">
             <div id="preimage"></div>
        </div>
    </div>
    

    and the css would be:

    .outer{
    position:absolute;
    right:0;
    }
    .container{
    position: relative; 
    }
    

    Since you can’t drag an element when you resize and vice-versa, a safer way(to avoid some of the issues) of using the javascript would be:

    $('#sqoutline2').resizable({
            'handles':"all",
            'autoHide':false,
            containment: "parent",
            start:function(){$('#sqoutline2').draggable('options','disabled','true');},
            stop:function(){$('#sqoutline2').draggable('options','disabled','false');}
        }).draggable({containment:"parent",
                start:function(){$('#sqoutline2').resizable('options','disabled','true');},
               stop:function(){$('#sqoutline2').resizable('options','disabled','false');}
           });     
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get HTML5's audio tag to work in Chrome. The following code
The code below works in FF, Safari, Chrome. But IE is giving me issues.
I have some code here which works perfectly in firefox but not in chrome
This code : http://jsfiddle.net/bYtTG/1/ Works as I want in FF, chrome and opera, but
It works in Chrome and I thought it used to work in IE8... but
I'm am trying to get jlembed to work but I constantly get errors in
this code works fine in Firefox, in chrome/internet explorer i get an error in
I'm trying to get the onError event to work but so far it only
Trying to get this to work: http://addyosmani.com/blog/autosave-changes-chrome-dev-tools/ I have never worked with node.js nor
I'm trying to get socket.io working but now in Chrome I get the error:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.