vodkabears/Remodal

e.reason not existing?

Opened this issue · 0 comments

wally commented

Hi,

When using the closing event detection, e.reason doesn't exist. It's missing in e.

For example, the example code

$(document).on('closed', '.remodal', function (e) {

  // Reason: 'confirmation', 'cancellation'
  console.log('Modal is closed' + (e.reason ? ', reason: ' + e.reason : ''));
  console.log(e)
});

Will return

Modal is closed
(and then a r.Event with no reason)

Is it gone or have I done something wrong?

Thanks,
wally