cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lese
Regular Visitor

Disable Scroll Using PCF

Hi I am developing a Mousewheel control and it should disable Model Driven UI Scroll while hovering a field.

I have tried assigning css class to html body when mouse is hovering the field. But it seems like the Model Driven UI does not inherit the css class to the elements inside the body.

I have also tried assigning the css class by using getElementByID but PCF does not recognize the element Id from the Model Driven UI.

 

Question is it possible to inherit styles from body to a certain element?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I was able resolve the problem by getting the div element that has the scroll by calling the role tag "tabpanel" by querySelector and injecting another class that will modify the scroll function of the model driven ui.

I used classList.toggle("<classname>"); to hide the overflow of model driven ui without changing or affecting its own css. Still need to further investigate for any side effects.

View solution in original post

2 REPLIES 2
DianaBirkelbach
Super User
Super User

Hi @Lese , 

Do you need control over your own control-area? A PCF gets to control it's own DIV, but is not supposed to make changes to the rest of the form.

Maybe it is possible, but this would be unsupported.

Kind regards,

Diana

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

I was able resolve the problem by getting the div element that has the scroll by calling the role tag "tabpanel" by querySelector and injecting another class that will modify the scroll function of the model driven ui.

I used classList.toggle("<classname>"); to hide the overflow of model driven ui without changing or affecting its own css. Still need to further investigate for any side effects.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,147)