Skip to content

Resizable: Modified to allow jquery objects as handles. Fixed #9658: Custom handlers did not work as jquery objects (outside the resizable element) #1134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from

Conversation

patrixd
Copy link
Contributor

@patrixd patrixd commented Nov 13, 2013

I needed to use as handle a div outside the resizable element. So I tried to specify the jquery element as the documentation said but it did not work.
handles: { "s": $("#customResizableHandle") },

The documentation said in handles option:
Object:
The following keys are supported: { n, e, s, w, ne, se, sw, nw }. The value of any specified should be a jQuery selector matching the child element of the resizable to use as that handle. If the handle is not a child of the resizable, you can pass in the DOMElement or a valid jQuery object directly.

Note: When generating your own handles, each handle must have the ui-resizable-handle class, as well as the appropriate ui-resizable-{direction} class, .e.g., ui-resizable-s.

This pull fix that bug. Now I can use a handle outside the element resizable. I hope this help.

I started using a code of a Stackoverflow reply from ylebre http://stackoverflow.com/questions/958419/custom-resizable-handles-in-jquery-ui but it didn't work at the beginning so I had to change it.

I needed to use as handle a div outside the resizable element. So I tried to specify the jquery element as the documentation said but it did not work.
handles: { "s": $("#customResizableHandle") },
The documentation said in handles option:
Object:
The following keys are supported: { n, e, s, w, ne, se, sw, nw }. The value of any specified should be a jQuery selector matching the child element of the resizable to use as that handle. If the handle is not a child of the resizable, you can pass in the DOMElement or a valid jQuery object directly.

Note: When generating your own handles, each handle must have the ui-resizable-handle class, as well as the appropriate ui-resizable-{direction} class, .e.g., ui-resizable-s.

I also found the next ticket: 
Ticket: http://bugs.jqueryui.com/ticket/4310 (2009 bug, still in last version)

My edition fix that bug (but I need to test it thoroughly). Now I can use a handle outside the element resizable. I hope this help.
My solution is based in a previous solution from ylebre http://stackoverflow.com/questions/958419/custom-resizable-handles-in-jquery-ui
I had to make some modifications and adaptions to the current version.
It validates the resize works
Before the description does not work. I was focused in jquery objects not selectors. Now all custom handlers work. http://bugs.jqueryui.com/ticket/4310
They must not be outside the element resizable as the documentation said, so I maid two resizable elements. If the element is outside the handler must be a jQuery object
…outside. Inside works in the current version.
@scottgonzalez
Copy link
Member

Before we can look at this, we'll need you to do a few things:

  • Create a bug report at http://bugs.jqueryui.com/ explaining the problem, with a reduced test case.
  • Sign our CLA
  • Clean up your commit history. There's no reason there should be a dozen commits to fix one bug. Please also make sure your new commit conforms to our commit message style guide.

Thanks.

@mtin79
Copy link

mtin79 commented Jan 17, 2014

Hi Scott, hi patrixd!
Has this fix made it into the latest version of jquery-ui?
Depending on it...

@scottgonzalez
Copy link
Member

No, it was closed 2 months ago without being merged.

@mtin79
Copy link

mtin79 commented Jan 17, 2014

Hi Scott,
thanks for your reply! Is there a chance of this fix being merge as i consider the current behaviour an issue (bug).

I for my part need to position the handle on an adjacent div of the resizable element. As the resizable container ist partially hidden.

Besides there's currently a heavy issue if i attach it to the resizable area itself as its a mapbox container which aggressively!!! intercepts all events on child elements!

Are you considering in supporting the behaviour of general handles as described in the jquery-ui documentation or are you going to delete that feature alltogether?

Thanks for you help!
Martin

@scottgonzalez
Copy link
Member

You can follow the status in our bug tracker: http://bugs.jqueryui.com/ticket/4310

@mtin79
Copy link

mtin79 commented Jan 17, 2014

Thanks for the information!

@patrixd
Copy link
Contributor Author

patrixd commented Feb 14, 2014

I do not understand. It is not closed. I followed your instructions and the bug is still open.
http://bugs.jqueryui.com/ticket/9658
I'm still waiting the merge #1135 , I also followed your instructions about the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants