In reveal foundation js, on click of X, background overlay doesn't disappear

442 Views Asked by At

On click of X (close btn), the background overlay still present.

I did following steps \

  1. click on link to open reveal modal.
  2. click on X to close it.

every thing is fine for the first time, but when i do the same step again

  1. click again on link to open reveal modal.
  2. when i click on X this time, the modal closed but overlay still present. And this prevent any further action on page.

One solution was to add, closeOnBackgroundClick=true, but i can't do this.

I tried to debug it, i found the problem is in toggle_bg() function, for the next time clicked, it calls this.show(this.settings.bg) where as it must call this.hide(this.settings.bg);

The code is in https://gist.github.com/yarosla/9844359

0

There are 0 best solutions below