On Ops Console we're having an issue using a ScrollNav inside a Drawer. This issue only occurs on IE (of course 😠). When I click one of the scroll nav buttons all of the content inside the drawer shifts over to the left, which makes the scroll nav buttons inaccessible. When I open the drawer though, the content inside is realigned correctly. This doesn't seem to happen if the drawer is on the left for some reason.
Mark Hollier and I worked on this for a while but we weren't able to figure out a solution and thought we might be spending too much time on it for our team's purposes. It seems that the javascript scrollIntoView() method is probably the culprit, unfortunately. In IE, it scrolls horizontally as much it can in order to put the scroll target at the edge of the container. Because the drawer is hidden offscreen it creates more width in the container that would normally not be there, which means the drawer container can use that width to "scroll" horizontally to the scroll target even though it really shouldn't. All other browsers we've used seem to handle this gracefully but IE crashes and burns per the norm.
I wonder if, for drawer mode 'overlay', it might work to only set the drawer outside the container just before the animation to slide it in occurs. This way the container width wouldn't be different except when the slide in animation needs to happen. Could be a possible solution?
Slack thread with GIF showing the issue in action.
Here is some HTML I was using as a POC to mess around with this. All the styling is in this file as well since it's just a POC. I tried to use stackblitz for this but couldn't get it to work with IE for some reason.
Summary
On Ops Console we're having an issue using a ScrollNav inside a Drawer. This issue only occurs on IE (of course 😠). When I click one of the scroll nav buttons all of the content inside the drawer shifts over to the left, which makes the scroll nav buttons inaccessible. When I open the drawer though, the content inside is realigned correctly. This doesn't seem to happen if the drawer is on the left for some reason.
Mark Hollier and I worked on this for a while but we weren't able to figure out a solution and thought we might be spending too much time on it for our team's purposes. It seems that the javascript scrollIntoView() method is probably the culprit, unfortunately. In IE, it scrolls horizontally as much it can in order to put the scroll target at the edge of the container. Because the drawer is hidden offscreen it creates more width in the container that would normally not be there, which means the drawer container can use that width to "scroll" horizontally to the scroll target even though it really shouldn't. All other browsers we've used seem to handle this gracefully but IE crashes and burns per the norm.
I wonder if, for drawer mode 'overlay', it might work to only set the drawer outside the container just before the animation to slide it in occurs. This way the container width wouldn't be different except when the slide in animation needs to happen. Could be a possible solution?
Slack thread with GIF showing the issue in action.
Here is some HTML I was using as a POC to mess around with this. All the styling is in this file as well since it's just a POC. I tried to use stackblitz for this but couldn't get it to work with IE for some reason.