Skip to content

Commit

Permalink
Do not click when selection is active (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 committed Mar 5, 2024
1 parent 9700e50 commit c85407b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DebugBar/Resources/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ if (typeof(PhpDebugBar) == 'undefined') {
}
}
li.css('cursor', 'pointer').click(function() {
if (window.getSelection().type == "Range") {
return''
}
var table = $(this).find('table');
if (table.is(':visible')) {
table.hide();
Expand Down
3 changes: 3 additions & 0 deletions src/DebugBar/Resources/widgets/templates/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
}
}
li.css('cursor', 'pointer').click(function() {
if (window.getSelection().type == "Range") {
return''
}
if (table.is(':visible')) {
table.hide();
} else {
Expand Down

0 comments on commit c85407b

Please sign in to comment.