Opened 9 years ago

Closed 7 years ago

#9057 closed bug (fixed)

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.

Change History (7)

comment:1 Changed 9 years ago by tj.vantoll

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/.

comment:2 Changed 9 years ago by 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."

comment:3 in reply to:  2 Changed 9 years ago by linus.yan87

Replying to 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.

comment:4 Changed 9 years ago by 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/

Last edited 9 years ago by ScottGaines (previous) (diff)

comment:5 in reply to:  4 ; Changed 9 years ago by linus.yan87

Replying to 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.

comment:6 in reply to:  5 Changed 9 years ago by ScottGaines

Replying to linus.yan87:

Replying to 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/

Version 1, edited 9 years ago by ScottGaines (previous) (next) (diff)

comment:7 Changed 7 years ago by mikesherov

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
Note: See TracTickets for help on using tickets.