Open form twice

Questions related to using nuBuilder Forte.

Open form twice

Postby Martin » Wed Jan 09, 2019 2:31 pm

Hello, I'm trying to open the same form twice. I open the first one with ctrl+click. This opens iit in a new tab. If I then click on the same Run Button again, nothing happens. Bug?
Martin
 
Posts: 20
Joined: Sat Nov 10, 2018 2:12 am

Re: Open form twice

Postby Martin » Fri Jan 11, 2019 2:26 pm

Found the reason: nuStopClick(event);

This function prevents a button from being clicked a second time. However, if the ctrl key is pressed, this function should not be called.
Martin
 
Posts: 20
Joined: Sat Nov 10, 2018 2:12 am

FIX for nuStopClick

Postby kev1n » Fri Jan 11, 2019 11:56 pm

Add to Setup/header this fix:

Code: Select all
// FIX: Ctrl + clicking a button will not disable the click event
function nuStopClick(e){
   if(window.nuCLICKER != '' && e.ctrlKey == false ){
      $(e.target).prop('onclick',null).off('click');
   }   
}
kev1n
 
Posts: 365
Joined: Mon Oct 15, 2018 2:13 am

Re: Open form twice

Postby Martin » Thu Jan 24, 2019 12:43 pm

kev1n, work like a charm !
Martin
 
Posts: 20
Joined: Sat Nov 10, 2018 2:12 am


Return to General