Enable clickable icons for link lints (#5271)

* Enable icon for link lints

* Enable clickable icons for link lints
This commit is contained in:
Christian Günter 2022-01-17 12:10:00 +01:00 committed by GitHub
parent 1a31eb3f2f
commit a416de1cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -931,6 +931,10 @@ div.message-panel:hover .message-panel-commands {
margin-left: -30px;
}
.link-hint-i {
margin-left: -30px;
}
.link-hint .pending { color: hsla(0, 0%, 0%, 0.2); }
/* Tooltip arrow */

View File

@ -1341,7 +1341,7 @@ LinkHints.prototype.getHintStartValue = function(targetsCount){
LinkHints.prototype.deployHintContainers = function() {
var hintTargets = document.querySelectorAll("a, input, textarea");
var hintTargets = document.querySelectorAll("a, input, textarea, i");
var codeCounter = this.getHintStartValue(hintTargets.length);
var hintsMap = { first: codeCounter };
@ -1368,8 +1368,12 @@ LinkHints.prototype.deployHintContainers = function() {
hint.container.classList.add("link-hint");
if (hint.parent.nodeName === "INPUT" || hint.parent.nodeName === "TEXTAREA"){
hint.container.classList.add("link-hint-input");
} else {
} else if (hint.parent.nodeName === "A") {
hint.container.classList.add("link-hint-a");
} else if (hint.parent.nodeName === "I" && hint.parent.classList.contains("cursor-pointer")) {
hint.container.classList.add("link-hint-i");
} else {
continue;
}
hint.container.classList.add("nodisplay"); // hide by default