38
Views
4
Comments
Solved
Modal buttons still clickable when modal is closed

Hi all 
I'm having an odd problem and I'm unsure if this is a known issue. 

This is a traditional web application 

In my screen, I have a form for the user to fill out. Upon clicking a button, a modal will appear allowing the user to add additional information. 

There are 2 buttons inside the modal, 'submit' and 'cancel'.
The issue is that when the modal is closed, the buttons inside are still clickable at a certain point in the screen, although they are invisible. The pointer changes to clickable and the screen action is called.  

This only happens when the application is loaded for the first time. The buttons are no longer clickable (when the modal is closed) once the page has been refreshed.  

Is there a logical reason why this could be happening? Or is this a known issue?
Service Studio version: 11.54.83

UserImage.jpg
Alexandru Gaidau
Solution

With the little info you provided we can just guess what you are doing in there. Keep in mind that hiding an element using css style does not actually delete the element from the dom. Try using if statement and ajax refresh to hide and show the modal

2024-09-12 02-43-38
Deepsagar Dubey

Hi @Niall Outsystem 

This is my assumption based on your comment, 

Set your button Method to Ajax Submit and in the selected Screen Action use ToggleModal action to close modal. 

then inside the associated screen action use ToggleModal action along with your logic's.

I hope it'll help you.

Thanks
Deep

2021-07-05 14-07-53
Gonçalo Duque

Not sure if I understand your issue but besides the previous answers here validate if the submit button inside the modal has the "Is Default" property set to No. (And if you don't have multiple buttons set as Default)

Having this property set to Yes inside a modal may cause the Action to be triggered from outside the modal when pressing the Enter key, even if the modal is closed.

Regards,

Gonçalo

UserImage.jpg
Niall Doherty

Hi all

Apologies for the delay in my reply.

Thanks for all the comments. It would seem that the solution given by Alex Gaidau has resolved the problem upon initial inspection. This ofcourse involves adding more logic to the application. It would be great if this was built in.

This leads me to your solution Gonçalo Duque. Perhaps it is built in, and changing the button default status may avoid adding conditional logic around the modals. I will test this although I cant guarantee when i will have the results as the deadline is approaching and time pressure is present.

Sorry for the lack of information. I can't provide screenshots as this is a work application and we have rules around such things. 

P.S Deepsagar Dubey - I am not sure your solution applies to this context - although thanks for your input. 

Thanks again to all of you,

Niall

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.