Fixes #3950 - Uncaught TypeError in ticket zoom highlighter

This commit is contained in:
Bola Ahmed Buari 2022-02-04 18:14:17 +01:00 committed by Dominik Klein
parent 7e9ec397be
commit b858b97742
4 changed files with 14 additions and 3 deletions

View file

@ -212,6 +212,8 @@ class App.TicketZoomHighlighter extends App.Controller
# - clears the selection
toggleHighlightAtSelection: (article, article_id) =>
return if !article
selection = rangy.getSelection()
# activate selection background

View file

@ -12,7 +12,7 @@
</div>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<% for entry, i in @colors: %>
<li role="presentation">
<li role="presentation" class="dropdown-highlight-list">
<a role="menuitem" tabindex="-1" class="js-highlightColor" data-key="<%= i %>">
<span class="dropdown-iconSpacer">
<span class="color-swatch icon" style="color: <%= entry.color %>"></span>

View file

@ -7,7 +7,7 @@
</div>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<% for entry, i in @colors: %>
<li role="presentation">
<li role="presentation" class="dropdown-highlight-list">
<a role="menuitem" tabindex="-1" class="js-highlightColor" data-key="<%= i %>">
<span class="dropdown-iconSpacer">
<span class="color-swatch icon" style="color: <%= entry.color %>"></span>

View file

@ -9025,6 +9025,15 @@ a.list-group-item.active > .badge,
padding: 0 18px;
}
li.dropdown-highlight-list {
// remove padding to add more click area for anchor tag
padding: 0;
a {
padding: 11px 18px;
}
}
.icon {
fill: currentColor;
}