Is there a way to disable modal resizable and draggable feature?

0
I’m curious about how to disable this feature. Is there a way to do it? I read the forum, there was a post from about 5 years ago, and I’m wondering if there’s a solution.   Does this has a solution? or Any Ideas?     Original Post: https://community.mendix.com/link/space/ui-&-front-end/questions/93328
asked
2 answers
0

Hi Francisco,

 

alternatively, you could do the following:

 

To prevent resize, you can simply select the radio button in the popup page configuration:

popup.jpg

 

To prevent dragging you could add the following to your main.scss:

.modal-dialog > .modal-content > .modal-header {
    pointer-events: none;

    > button {
        pointer-events: all;
    }
}

 

Hope that helps!

 

Best,

Holger

 

answered
0

Not standard available, but it can be done using css. Find a selector for the dialogmessage's most outer element and add this to its styling.

pointer-events: none;

As a result you will no longer be able to resize nor move the modal popup.

A side-effect is that you will also not be able to click on any element in the popup, like the close-x on top-right, or any available button.

To counter that side-effect: for every dom-element that you need to be able to click on, add this style:

pointer-events: all;

Hope you get there. Best of luck.

answered