dom_autoscroller icon indicating copy to clipboard operation
dom_autoscroller copied to clipboard

autoScroll starts scrolling when modification is done via chrome dev tools

Open hassanasad opened this issue 6 years ago • 2 comments

I am using dom-autoscroller with my Angular (v5) project and it works fine for the intended purpose. However i have noticed that when ever i modify something from the chrome dev tools to the elements of the applied scroller (such as changing class names or removing a DOM element) - it triggers the autoscroll to scroll all the way up unless i go to my browser window and click init. I am not sure why its triggering, probably a bug ?

For reference this is my autoscroller code:

this.autoscroller = autoScroll([this.rightPanel.nativeElement],{
	margin: 20,
	maxSpeed: 15,
	scrollWhenOutside: true,
	autoScroll: function() {
		return this.down;
	}
});

Where rightPanel is the element i have applied the autoscroller to.

hassanasad avatar Mar 21 '18 07:03 hassanasad

Seems mysterious. Is there any more information you can provide?

Does the effect happen when the child elements of this.rightPanel.nativeElement get changed programmatically?

I have noticed something similar happening in firefox when the firefox web console is open. The console steals the focus from the webpage so some updates (for instance mouse movement detection) in source code get interfered with. Maybe that's what's happening. This might not be fixable if so. There's no easy way to detect if browser chrome is stealing focus.

hollowdoor avatar Apr 24 '18 19:04 hollowdoor

Sorry for being so late to reply by the way.

hollowdoor avatar Apr 24 '18 19:04 hollowdoor