[Vtigercrm-developers] app.helper.showModal() prevent modal closing too easily?

Alan Lord alanslists at gmail.com
Wed Oct 23 07:54:12 GMT 2019


Fixed it!!!

See this on stackoverflow:

https://stackoverflow.com/questions/34440464/bootstrap-modal-backdrop-static-not-working

In helper.js, if you add the suggested line after

$('.myModal').modal('hide');

So it looks like:

$('.myModal').modal('hide');
$('.myModal').data('bs.modal',null);


In the hideModal() function then it works :-)


Hope that helps others.


Al


On 23/10/2019 08:37, Alan Lord wrote:
> To follow up on this, it "should" be possible but I just did a quick 
> test and it didn't seem to work.
> 
>              params = {
>                  "cb": callBackFunction,
>                  backdrop: 'static',
>                  keyboard: false
>              };
>              app.helper.showModal(data, params);
> 
> In helper.js the params object should be passed to bootstrap modal:
> 
>          container.html(content).modal(params);
>          vtUtils.applyFieldElementsView(container);
> 
> And in vtiger/libraries/bootstrap/bootstrap-modal.js I can see 
> references to the backdrop 'static' value and also to the keyboard 
> option. (It is quite an old version, 2.0.1 but nevertheless the options 
> are in the code).
> 
> 
> So I have no idea why it doesn't work...
> 
> 
> See: https://getbootstrap.com/docs/3.4/javascript/#modals-options
> 
> 
> Al
> 
> 
> On 22/10/2019 20:20, Alan Lord wrote:
>> On 22/10/2019 15:56, Rubén A. Estrada Orozco wrote:
>>> I don't know the answer but I can confirm that behavior is annoying.
>>>
>>> Saludos
>>>
>>> Rubén
>>
>> :-D
>>
>> +1
> 
> 
> 
> _______________________________________________
> http://www.vtiger.com/




More information about the vtigercrm-developers mailing list