Changeset - 99d29f43bdd1
[Not reviewed]
default
0 2 0
Mads Kiilerich - 10 years ago 2015-08-11 12:39:07
madski@unity3d.com
comments: bind comment-bubble click handler to table and use sub selector

Avoid jQuery looping over all lines and binding comment-bubble click handler to
every line on page load.

Avoids 'Maximum call stack size exceeded' when loading a huge diff in Chrome.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -224,7 +224,7 @@ ${self.repo_context_bar('changelog', c.c
 
              }
 
          });
 

	
 
          $('.add-bubble').click(function(e){
 
          $('.code-difftable').on('click', '.add-bubble', function(e){
 
              show_comment_form($(this));
 
          });
 

	
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -376,7 +376,7 @@ ${self.repo_context_bar('showpullrequest
 
      $(document).ready(function(){
 
          PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA);
 

	
 
          $('.add-bubble').click(function(e){
 
          $('.code-difftable').on('click', '.add-bubble', function(e){
 
              show_comment_form($(this));
 
          });
 

	
0 comments (0 inline, 0 general)