Skip to main content

Search and Top Navigation

#9057 closed bug (fixed)

Opened February 05, 2013 07:28AM UTC

Closed August 07, 2014 01:58PM UTC

Core: scrollParent not working properly in IE for static or relative elements

Reported by: linus.yan87 Owned by:
Priority: minor Milestone: 1.10.4
Component: ui.core Version: 1.10.0
Keywords: Cc:
Blocked by: Blocking:
Description

For IE, element whose position is static or relative can't get the right scroll parent. Because it only checks parents which are positioned.

In fact, elements which have dimension(height|width is not auto) and overflow is auto|scroll, they are also scroll parent.

Attachments (0)
Change History (7)

Changed February 05, 2013 01:28PM UTC by tj.vantoll comment:1

status: newopen
summary: In IE, scrollParent() function not working properlyscrollParent not working properly in IE

Confirmed the first part of this.

scrollParent
does not find non-positioned elements in IE - http://jsfiddle.net/tj_vantoll/scdC5/.

Changed February 05, 2013 01:30PM UTC by tj.vantoll comment:2

linus.yan87,

Could you clarify or post a test case for this:

''"In fact, elements which have dimension(height|width is not auto) and overflow is auto|scroll, they are also scroll parent."''

Changed February 06, 2013 02:28AM UTC by linus.yan87 comment:3

Replying to [comment:2 tj.vantoll]:

linus.yan87, Could you clarify or post a test case for this: ''"In fact, elements which have dimension(height|width is not auto) and overflow is auto|scroll, they are also scroll parent."''

Test case address: http://jsfiddle.net/linus/N8Pmc/. In firefox, it will alert HTMLDivElement; But, in IE, it alerts HTMLDocument.

Changed February 07, 2013 05:34PM UTC by ScottGaines comment:4

_comment0: I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the parent function and that is when I found the IE issue. \ \ Here is the extend I did to find this issue \ http://jsfiddle.net/g4M4t/3/ \ \ Here is the I guess kind of fix I came up with. I'm not sure if its a good fix or not. \ http://jsfiddle.net/g4M4t/4/1360258557542750
_comment1: I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. \ \ Here is the extend I did to find this issue \ http://jsfiddle.net/g4M4t/3/ \ \ Here is the I guess kind of fix I came up with. I'm not sure if its a good fix or not. \ http://jsfiddle.net/g4M4t/4/1360258729080111
_comment2: I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. \ \ Here is the extend I did to find this issue \ http://jsfiddle.net/g4M4t/3/ \ \ Here is the I guess kind of fix I came up with. I'm not sure if its a good fix or not. \ http://jsfiddle.net/g4M4t/6/1360258755907094
_comment3: I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. \ \ Here is the extend I did to find this issue \ http://jsfiddle.net/g4M4t/3/ \ \ Here is the, I guess, kind of fix I came up with. I'm not sure if its a good fix or not. \ http://jsfiddle.net/g4M4t/6/1360260459635585

I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue.

Here is the extend I did to find this issue

http://jsfiddle.net/g4M4t/3/

Here is the, I guess, kind of fix I came up with. I'm not sure if its a good fix or not.

http://jsfiddle.net/g4M4t/6/

Working example

http://jsfiddle.net/N8Pmc/2/

Changed February 08, 2013 02:22AM UTC by linus.yan87 comment:5

Replying to [comment:4 ScottGaines]:

I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. Here is the extend I did to find this issue http://jsfiddle.net/g4M4t/3/ Here is the, I guess, kind of fix I came up with. I'm not sure if its a good fix or not. http://jsfiddle.net/g4M4t/6/ Working example http://jsfiddle.net/N8Pmc/2/

overflow:hidden is not allowed to have scroll bar, so it's not scroll parent. I'm inclined to advise you to change the height dynamically.

Changed February 08, 2013 02:38PM UTC by ScottGaines comment:6

_comment0: Replying to [comment:5 linus.yan87]: \ > Replying to [comment:4 ScottGaines]: \ > > I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. \ > > \ > > Here is the extend I did to find this issue \ > > http://jsfiddle.net/g4M4t/3/ \ > > \ > > Here is the, I guess, kind of fix I came up with. I'm not sure if its a good fix or not. \ > > http://jsfiddle.net/g4M4t/6/ \ > > \ > > \ > > Working example \ > > http://jsfiddle.net/N8Pmc/2/ \ > \ > overflow:hidden is not allowed to have scroll bar, so it's not scroll parent. I'm inclined to advise you to change the height dynamically. \ \ It wasn't the height I needed but the width and changing the width did not fit my needs for the project I was working on. I don't want a scroll bar but the scroll-ability. I couldn't get the desired effect with changing the width. I you have a better idea I'd love to hear it. \ \ This is what I was doing when I found this IE issue that this topic is about (still in development) \ http://jsfiddle.net/rbb4X/ \ \ \ 1360335146101259
_comment1: Replying to [comment:5 linus.yan87]: \ > Replying to [comment:4 ScottGaines]: \ > > I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. \ > > \ > > Here is the extend I did to find this issue \ > > http://jsfiddle.net/g4M4t/3/ \ > > \ > > Here is the, I guess, kind of fix I came up with. I'm not sure if its a good fix or not. \ > > http://jsfiddle.net/g4M4t/6/ \ > > \ > > \ > > Working example \ > > http://jsfiddle.net/N8Pmc/2/ \ > \ > overflow:hidden is not allowed to have scroll bar, so it's not scroll parent. I'm inclined to advise you to change the height dynamically. \ \ It wasn't the height I needed but the width and changing the width did not fit my needs for the project I was working on. I don't want a scroll bar but the scroll-ability. I couldn't get the desired effect with changing the width. If you have a better idea I'd love to hear it. \ \ This is what I was doing when I found this IE issue that this topic is about (still in development) \ http://jsfiddle.net/rbb4X/ \ \ \ 1360337344144757

Replying to [comment:5 linus.yan87]:

Replying to [comment:4 ScottGaines]: > I also ran into this problem but i needed the draggable stuff to scroll when over flow was hidden so I extended the scrollParent function and that is when I found the IE issue. > > Here is the extend I did to find this issue > http://jsfiddle.net/g4M4t/3/ > > Here is the, I guess, kind of fix I came up with. I'm not sure if its a good fix or not. > http://jsfiddle.net/g4M4t/6/ > > > Working example > http://jsfiddle.net/N8Pmc/2/ overflow:hidden is not allowed to have scroll bar, so it's not scroll parent. I'm inclined to advise you to change the height dynamically.

It wasn't the height I needed but the width and changing the width did not fit my needs for the project I was working on. I don't want a scroll bar but the scroll-ability. I couldn't get the desired effect with changing the width. If you have a better idea I'd love to hear it.

This is what I was doing when I found this IE issue that this topic is about (still in development)

http://jsfiddle.net/rbb4X/ (the one with the IE Issue)

Click and drag the tab to the side makes the other tabs scroll so you can sort across all of the tabs works in firefox chrome and safari but not IE. Also if I didn't extend the the scroll parent to use hidden the it would only work if it had a scroll bar, and in everything but IE. Removing the if statement in the scroll parent function where it test for IE and just used the part in the else fixed it in IE 9. Now I'm not sure it the IE test was there for an older version of IE or not I don't have an older version of IE to test with.

With the dragging I couldn't see a way the default scroll in the draggable widget would work when you have a case when you do not want a scroll bar (overflow:hidden).

Doing what you suggested would seem like your suggesting to extend another widget to do a functional aspect that I can see being useful in many ways that basically already exists in another form but not supported. I don't see how an overflow of hidden would not be considered a scrollParent just because i dose not use a scrollbar even though it dose have the capabilities of scrolling.

I could extend the draggable widget to do what i need it to do but extending the scrollParent function was the fastest least hacky was to do it

Changed August 07, 2014 01:58PM UTC by mikesherov comment:7

milestone: none1.10.4
resolution: → fixed
status: openclosed
summary: scrollParent not working properly in IECore: scrollParent not working properly in IE for static or relative elements