user3019432
user3019432

Reputation: 21

How does angular material disable global scroll on dropdown focus?

https://material.angular.io/components/select/overview

On dropdown open, the global scroll is disabled. However, no position property of <html> or <body> was changed, the global scroll bar was also present.

Upvotes: 1

Views: 1136

Answers (1)

saivishnu tammineni
saivishnu tammineni

Reputation: 1252

It is because the select drop down body is implemented with overlays in angular.

This overlay opens up on the complete window kindof blocking access to the underling html content.

You can inspect the html and see a overlay container inside body tag.

Once you open the select drop down and try inspecting on the screen it will be inside this overlay container

Upvotes: 2

Related Questions