ng-scrollable icon indicating copy to clipboard operation
ng-scrollable copied to clipboard

"scrollable-ignore" on focused elements

Open nemes1s opened this issue 8 years ago • 0 comments

Hello!

Was wondering, could there be a solution of my problem:

I have a very long list inside a ng-scrollable element, which is shown in uib-popover with it's own scroll (max-height; overflow-hidden).

When focusing on the most bottom element of that list, ng-scrollable launches it's own "handleFocus" function, which leads to content of ng-scrollable scroll to bottom as it sums up all focused element's parent's offsets here:

while (t && !t.classList.contains('scrollable')) {
            top += t.offsetTop;
            left += t.offsetLeft;
            t = t.offsetParent;
          } 

Current workaround i use, is just adding "scrollable" class to a focusable element.

Cheers.

nemes1s avatar Aug 25 '17 10:08 nemes1s