Skip to main content

Search and Top Navigation

#9535 closed bug (invalid)

Opened September 05, 2013 11:56AM UTC

Closed September 20, 2013 08:44AM UTC

resizable() does not take scrollposition of containment into account

Reported by: PaulSinnema Owned by: PaulSinnema
Priority: minor Milestone: none
Component: ui.resizable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

I'm quite new to jQuery UI but not to jQuery. We use the Kendo UI from Telerik to build our website. We are currently building a gantt chart inside a row of the Kendo UI grid. The problem here is that the rows can be scrolled horizontally and vertically. When the grid is at position 0, 0 the resizable() function works flawlessly but as soon as I start scrolling the postion of the sizing element is calculated wrong in the _mouseStart. I've created a patch for it. I've pasted it below.

Regards

Paul

_mouseStart: function(event) {

var curleft, curtop, cursor,

o = this.options,

iniPos = this.element.position(),

el = this.element;

this.resizing = true;

bugfix for http:dev.jquery.com/ticket/1749

if ( (/absolute/).test( el.css("position") ) ) {

el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });

} else if (el.is(".ui-draggable")) {

var scrollLeft = 0;

var scrollTop = 0;

if (o.containment) {

scrollLeft = o.containment.scrollLeft();

scrollTop = o.containment.scrollTop();

}

el.css({ position: "absolute", top: iniPos.top + scrollTop, left: iniPos.left + scrollLeft});

}

Attachments (0)
Change History (15)

Changed September 05, 2013 12:14PM UTC by PaulSinnema comment:1

Changed September 05, 2013 01:48PM UTC by PaulSinnema comment:2

Patch is not correct. Misunderstood the 'containment' option. Resize is still not working correctly. I'll take a close look

Changed September 05, 2013 01:51PM UTC by tj.vantoll comment:3

owner: → PaulSinnema
status: newpending

Hi PaulSinnema,

When you update this please include a reduced test case that shows the issue you're experiencing. You can use this as a starting point: http://jsfiddle.net/tj_vantoll/82Ka5/.

Changed September 05, 2013 02:05PM UTC by PaulSinnema comment:4

status: pendingnew

Made a new patch that takes the topScroll() and leftScroll() of the scrollParent() into account.

Changed September 05, 2013 02:56PM UTC by PaulSinnema comment:5

_comment0: Tried to reproduce the problem but can't. I do see some irratic behavior when resizable() and draggable() are combined as can be observed here: http://jsfiddle.net/82Ka5/3/. \ Just test my patch locally and there still is a problem. 1378393215952941

Tried to reproduce the problem but can't. I do see some irratic behavior when resizable() and draggable() are combined as can be observed here: http://jsfiddle.net/82Ka5/3/.

Just test my patch locally and there still is a problem. The way we use it is in a cell of a grid (kendoGrid). The left offset of the cell is not taken into account by the resizable() meaning that the resize stops when it reaches the its calculated size from the left which starts at 0 instead of the offset to the last cell to the left of the cell that contains the object to be resized.

Changed September 05, 2013 02:58PM UTC by tj.vantoll comment:6

status: newpending

Replying to [comment:5 PaulSinnema]:

Tried to reproduce the problem but can't. I do see some irratic behavior when resizable() and draggable() are combined as can be observed here: http://jsfiddle.net/82Ka5/3/. Just test my patch locally and there still is a problem.

#6939 covers that issue.

Changed September 05, 2013 03:33PM UTC by PaulSinnema comment:7

status: pendingnew

Yes it covers the irratic behavior I was talking about but not the offset problem.

Changed September 05, 2013 03:41PM UTC by PaulSinnema comment:8

Can I attach a video?

Changed September 05, 2013 03:44PM UTC by scottgonzalez comment:9

component: ui.coreui.resizable
status: newpending

No, we need a reduced test case. If we can't reproduce it, we can't fix it.

Changed September 05, 2013 03:45PM UTC by PaulSinnema comment:10

status: pendingnew

I could try and make test case with a kendoGrid in JSFiddle if that's ok?

Changed September 05, 2013 03:48PM UTC by scottgonzalez comment:11

status: newpending

Sorry, that's way too much third party code. Please reduce it to find what is introducing the problem.

Changed September 05, 2013 03:52PM UTC by PaulSinnema comment:12

status: pendingnew

Just removed the draggable() from the elements in our application. Now the resize seems to work OK. I guess you were right after all. It is the same issue. As soon as I activate the draggable() together with the resizable() things start going wrong.

Changed September 05, 2013 04:21PM UTC by PaulSinnema comment:13

Just tried the work arround in that ticket. It does not help me. This solution also does not take the offset from the cell into account. I think I better drop it.

Changed September 05, 2013 05:44PM UTC by scottgonzalez comment:14

status: newpending

Changed September 20, 2013 08:44AM UTC by trac-o-bot comment:15

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!