javascript - View page is locked/disabled after closing Bootstrap modal dialog -


this problem driving me crazy now. here sequence , code doing:

i using backbone (chaplin) js, jquery , handlebars

  1. display table multiple rows in view rendered via handlebar template
  2. launch bootstrap modal dialog page
  3. fill information, click "save" button on modal dialog.

  4. in button click handler function, insert record table row model data like:

    this.model.tabledata.push(new_record);

    this.render();

  5. call render refresh view updated model data

result , problem:

  • the table refreshed new record
  • the modal dialog disappeared
  • the view locked greyed out , not respond click anymore.

what issue , how fix? please help!

finally figured out way fix problem. code following:

$('#mymodal').modal('hide'); $('#mymodal').on('hidden.bs.modal', function () {     _this.render(); }) 

basically need wait dialog closed before rendering parent view page. not sure why works. can answer. guess has fired event sequence.


Comments