Przeglądaj źródła

Fix tag ID uniqueness (#6990)

* Fix tag ID uniqueness
fix https://github.com/FreshRSS/FreshRSS/pull/6052#discussion_r1837266309

* Update app/views/helpers/index/tags.phtml

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

---------

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Alexandre Alapetite 1 rok temu
rodzic
commit
3d8dd6e1fa
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      app/views/helpers/index/tags.phtml

+ 3 - 2
app/views/helpers/index/tags.phtml

@@ -22,8 +22,9 @@
 	<?php if (!empty($remainingTags)): // more than 7 tags: show dropdown menu ?>
 		<li class="item tag">
 			<div class="dropdown">
-				<div id="dropdown-tags2-<?= $this->entry->id() ?>" class="dropdown-target"></div>
-				<a class="dropdown-toggle" href="#dropdown-tags2-<?= $this->entry->id() ?>"><?= _i('down') ?></a>
+				<?php $dropId = 'dropdown-tags-' . hrtime(true); ?>
+				<div id="<?= $dropId ?>" class="dropdown-target"></div>
+				<a class="dropdown-toggle" href="#<?= $dropId ?>"><?= _i('down') ?></a>
 				<ul class="dropdown-menu">
 					<li class="dropdown-header"><?= _t('index.tag.related') ?></li>
 					<?php if (Minz_Request::controllerName() === 'index'): ?>