Always show input when editing text by removing hover (#15034)

This commit is contained in:
Natalie Tay
2021-11-22 10:23:42 +08:00
committed by GitHub
parent df6003aef5
commit 9015183942
2 changed files with 6 additions and 0 deletions

View File

@@ -688,6 +688,7 @@ export default Component.extend(ComposerUpload, {
imageResize.removeAttribute("hidden");
readonlyContainer.removeAttribute("hidden");
buttonWrapper.removeAttribute("editing");
editContainer.setAttribute("hidden", "true");
},
@@ -743,6 +744,7 @@ export default Component.extend(ComposerUpload, {
);
const editContainerInput = editContainer.querySelector(".alt-text-input");
buttonWrapper.setAttribute("editing", "true");
imageResize.setAttribute("hidden", "true");
readonlyContainer.setAttribute("hidden", "true");
editContainerInput.value = altText.textContent;

View File

@@ -195,6 +195,10 @@
z-index: 1; // needs to be higher than image
background: var(--secondary); // for when images are wider than controls
&[editing] {
opacity: 1;
}
.scale-btn-container,
.alt-text-readonly-container,
.alt-text-edit-container {