cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

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
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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (70,861)