mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:26 +00:00
Fix word overflow in file search page (#32695)
This commit is contained in:
parent
136408307c
commit
690d07470c
@ -9,7 +9,7 @@
|
|||||||
<input id="repo-file-find-input" type="text" autofocus data-url-data-link="{{.DataLink}}" data-url-tree-link="{{.TreeLink}}">
|
<input id="repo-file-find-input" type="text" autofocus data-url-data-link="{{.DataLink}}" data-url-tree-link="{{.TreeLink}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table id="repo-find-file-table" class="ui single line table">
|
<table id="repo-find-file-table" class="ui single line fixed table">
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -90,6 +90,7 @@ function filterRepoFiles(filter) {
|
|||||||
const span = document.createElement('span');
|
const span = document.createElement('span');
|
||||||
// safely escape by using textContent
|
// safely escape by using textContent
|
||||||
span.textContent = part;
|
span.textContent = part;
|
||||||
|
span.title = span.textContent;
|
||||||
// if the target file path is "abc/xyz", to search "bx", then the matchResult is ['a', 'b', 'c/', 'x', 'yz']
|
// if the target file path is "abc/xyz", to search "bx", then the matchResult is ['a', 'b', 'c/', 'x', 'yz']
|
||||||
// the matchResult[odd] is matched and highlighted to red.
|
// the matchResult[odd] is matched and highlighted to red.
|
||||||
if (index % 2 === 1) span.classList.add('ui', 'text', 'red');
|
if (index % 2 === 1) span.classList.add('ui', 'text', 'red');
|
||||||
|
Loading…
Reference in New Issue
Block a user