Commit 13940a655dbdbcc2552ecef922b3a2bc52005075: prevent jquery and react from stepping on each other
Branch: refs/heads/master Author: Sam Ruby <ru...@intertwingly.net> Committer: Sam Ruby <ru...@intertwingly.net> Pusher: rubys <ru...@apache.org> ------------------------------------------------------------ www/board/agenda/views/buttons/commit.js.rb | +++++++ --- ------------------------------------------------------------ 10 changes: 7 additions, 3 deletions. ------------------------------------------------------------ diff --git a/www/board/agenda/views/buttons/commit.js.rb b/www/board/agenda/views/buttons/commit.js.rb index 44603e6..9d8cc48 100644 --- a/www/board/agenda/views/buttons/commit.js.rb +++ b/www/board/agenda/views/buttons/commit.js.rb @@ -115,9 +115,13 @@ def click(event) Agenda.load response.agenda Pending.load response.pending @disabled = false - jQuery('#commit-form').modal(:hide) - document.body.classList.remove('modal-open') - jQuery('.modal-backdrop').remove(); + + # delay jQuery updates to give React a chance to make updates first + setTimeout 300 do + jQuery('#commit-form').modal(:hide) + document.body.classList.remove('modal-open') + jQuery('.modal-backdrop').remove(); + end end end end