Fix tag double click
This commit is contained in:
parent
05bb4aef71
commit
dd700af0be
@ -208,17 +208,21 @@ button.action-button {
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline;
|
||||
display: inline-block;
|
||||
padding: 0.2em 0.6em 0.3em;
|
||||
font-size: 75%;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
line-height: 1.25;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: 0.25em;
|
||||
}
|
||||
|
||||
.tag-inner {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tag-list>.tag+.tag {
|
||||
margin-left: 0.375em;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@
|
||||
<template id="kanji-glossary-item-template"><li class="kanji-glossary-item"><span class="kanji-glossary"></span></li></template>
|
||||
<template id="kanji-reading-template"><dd class="kanji-reading"></dd></template>
|
||||
|
||||
<template id="tag-template"><span class="tag"></span></template>
|
||||
<template id="tag-frequency-template"><span class="tag" data-category="frequency"><span class="term-frequency-dictionary-name"></span><span class="term-frequency-separator"></span><span class="term-frequency-value"></span></template>
|
||||
<template id="tag-template"><span class="tag"><span class="tag-inner"></span></span></template>
|
||||
<template id="tag-frequency-template"><span class="tag" data-category="frequency"><span class="tag-inner"><span class="term-frequency-dictionary-name"></span><span class="term-frequency-separator"></span><span class="term-frequency-value"></span></span></template>
|
||||
|
||||
</body></html>
|
||||
|
@ -252,8 +252,10 @@ class DisplayGenerator {
|
||||
createTag(details) {
|
||||
const node = DisplayGenerator._instantiateTemplate(this._tagTemplate);
|
||||
|
||||
const inner = node.querySelector('.tag-inner');
|
||||
|
||||
node.title = details.notes;
|
||||
node.textContent = details.name;
|
||||
inner.textContent = details.name;
|
||||
node.dataset.category = details.category;
|
||||
|
||||
return node;
|
||||
|
Loading…
Reference in New Issue
Block a user