whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 13940a6: prevent jquery and react from stepping on each other
Date Fri, 11 Mar 2016 11:56:54 GMT
Commit 13940a655dbdbcc2552ecef922b3a2bc52005075:
    prevent jquery and react from stepping on each other


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@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

Mime
View raw message