FoxInCloud
static backdrop modal
Gravatar is a globally recognized avatar based on your email address. static backdrop modal
  Vincent H.
  All
  Sep 18, 2024 @ 03:40am

Hi Thierry,

I would like to have a window that does not close by clicking outside

In bootstrap I found: "static backdrop modal"

So in wcHTMLgen(), I added:

   toHTMLgen.cScriptJSadd (TEXTMERGE ([jQuery('#modal-<<THISFORM.wcID>>').removeAttr("data-backdrop").attr("data-bs-backdrop", "static").attr(" data-bs-keyboard", "false");])) && Static

The addition was successfully made but the behavior is unchanged.

Do you see where the problem could be? Does FiC have a related property?

Thank you in advance

Gravatar is a globally recognized avatar based on your email address. re: static backdrop modal
  Vincent H.
  Vincent H.
  Sep 19, 2024 @ 10:24pm

Finally, it is difficult to modify the behavior of the window after it is launched.
I ended up taking the problem in reverse and looking at how FiC generates the "backdrop" instruction
In awServer.prg, I saw that it was enough to declare a windowType = 0 to generate 'data-backdrop="false"'
I still have to prevent the screen from closing by clicking on [Esc]

  1. How to do it ?
  2. I am far from having covered the issue because certain modal screens have a "static" behavior despite the HTML "backdrop" instruction
  3. Shouldn't we add "bs-" and a "keyboard" instruction like this (Bootstrap doc) ?
data-bs-backdrop="static" data-bs-keyboard="false"
Gravatar is a globally recognized avatar based on your email address. re: static backdrop modal
  FoxInCloud Support - Thierry N.
  Vincent H.
  Sep 19, 2024 @ 11:21pm

Hi Vincent,

prevent the screen from closing by clicking on [Esc]

If your form is modal (.windowType = 1) and has a callback method, it should not close by clicking on [Esc] or in the backdrop around the form.

Gravatar is a globally recognized avatar based on your email address. re: static backdrop modal
  Vincent H.
  FoxInCloud Support - Thierry N.
  Sep 20, 2024 @ 12:31am

In fact, I want a screen that does not close when clicking outside or by [ESC]

Gravatar is a globally recognized avatar based on your email address. re: static backdrop modal
  FoxInCloud Support - Thierry N.
  Vincent H.
  Sep 20, 2024 @ 12:46am

like what I answered: a VFP modal form with a callback

can you share your VFP code for opening the form?

Gravatar is a globally recognized avatar based on your email address. re: static backdrop modal
  Vincent H.
  FoxInCloud Support - Thierry N.
  Sep 20, 2024 @ 12:59am

with a callBack

It's OK, thanks !

© 1996-2024