In my HTML table, I have long text in a cell that I don't want to display fully. To truncate the text, I am using the 'text-truncate' CSS attribute. Additionally, I am considering using Bootstrap tooltip to show the full text when needed. Here is an example of the code snippet:
<td style="cursor: pointer">
<span
class="d-inline-block text-truncate"
style="max-width: 350px"
data-bs-toggle="modal"
data-bs-target="#literModal"
data-pmid="{{ literature.pmid }}"
data-title="{{ literature.article_title }}"
>
<a
data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
data-bs-title="{{ literature.article_title }}"
>{{ literature.article_title | default:"None" }}</a
>
</span>
</td>
While this setup works well, there is an issue where the tooltip displays near another cell instead of the intended one. You can see how it looks here: https://i.sstatic.net/tyvSt.png
The problem seems to be related to the truncation of the text causing the tooltip to display incorrectly. Are there any solutions for this? Any help would be appreciated.