Skip to main content

Bug Tracker

Side navigation

#3589 closed feature ()

Opened November 10, 2008 01:43PM UTC

Closed November 11, 2010 11:09PM UTC

Last modified March 15, 2012 12:06AM UTC

Add scrollParent() method to detect the scrolling parent

Reported by: paul Owned by: brandon
Priority: major Milestone: 1.3
Component: offset Version: 1.2.6
Keywords: Cc: paul, flesler
Blocked by: Blocking:
Description

Similar to how jQuery.fn.offsetParent works, this function returns the immediate scrolling parent.

This means in detail, the first element in parents() that has one of the following css attributes set to auto or scroll: overflow, overflow-x, overflow-y.

It's especially useful in anything collision detection related - 10+ instances in jQuery UI, for example could be made a lot shorter.

Attachments (0)
Change History (6)

Changed November 10, 2008 04:19PM UTC by flesler comment:1

cc: → paul, flesler
need: ReviewTest Case

I'm not sure this would be useful for the common jQuery user.

If it's needed in UI, maybe it'd be better to add that to UI.

Can you provide a couple of non-UI related applications ?

Changed November 11, 2008 10:51AM UTC by paul comment:2

Collision detection means:

1) Any tooltip plugin

2) Any menu plugin

In other words, any usecase where you have an element and you need to control and check in what logical container it sits in - that is always the scrollParent.

Changed November 11, 2008 12:35PM UTC by flesler comment:3

tooltip and menu seem like UI to me.

Any non-UI test cases.

Changed November 11, 2008 03:40PM UTC by paul comment:4

There are hundreds of plugins that create similar functionality that are not part of jQuery UI - or are you talking of the generic term "user interface"?

If you're talking not specifically about jQuery UI, then your argument is almost pointless - jQuery is always used to alter/create an UI.

Changed October 14, 2010 03:14AM UTC by snover comment:5

status: newpending

This ticket has been marked as missing a test case. In an effort to reduce the number of outstanding tickets in the bug tracker, it will be closed automatically in 30 days. In order to prevent this from happening, please provide a working test case. If a test case has already been provided and our records are wrong, please respond to the ticket so that it can be fixed. Thank you!

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:6

status: pendingclosed

Automatically closed due to 14 days of inactivity.