Skip to content

Commit

Permalink
check elements are rc buttons before we try to process them
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoh committed Jul 23, 2014
1 parent 9b72a54 commit 08ae9b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ function rcube_context_menu(p) {
return;
}

// skip any element that does not look like a Roundcube button
if (!elem.attr('onclick')) {
return;
}

if (elem.attr('onclick').match(rcmail.context_menu_command_pattern)) {
command = RegExp.$1;
args = RegExp.$2;
Expand Down

0 comments on commit 08ae9b9

Please sign in to comment.