forked from devs/PCv5
editor: Fix input being cleared on click in link modal
This commit is contained in:
parent
44609f2f96
commit
8fbec9ed87
|
@ -161,11 +161,6 @@ function editor_display_link_modal(event) {
|
|||
else if (selection != "") {
|
||||
event.currentTarget.querySelector("#link-desc-input").value = selection;
|
||||
}
|
||||
// Or nothing selected
|
||||
else {
|
||||
event.currentTarget.querySelector("#link-desc-input").value = "";
|
||||
event.currentTarget.querySelector("#link-link-input").value = "";
|
||||
}
|
||||
|
||||
event.currentTarget.children[1].style = {'display': 'block'};
|
||||
}
|
||||
|
@ -354,8 +349,8 @@ if (document.cookie.split(";").some((item) => item.trim().startsWith("auto-previ
|
|||
}
|
||||
|
||||
|
||||
previewTimeout = null;
|
||||
ta = document.querySelector(".editor textarea");
|
||||
let previewTimeout = null;
|
||||
let ta = document.querySelector(".editor textarea");
|
||||
ta.addEventListener('keydown', function(e) {
|
||||
// Tab insert some spaces
|
||||
let keyCode = e.keyCode || e.which;
|
||||
|
|
|
@ -182,10 +182,5 @@
|
|||
{% for error in field.errors %}
|
||||
<span class="msgerror">{{ error }}</span>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Load the script -->
|
||||
<script>
|
||||
window.addEventListener("load", function(){});
|
||||
</script>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
|
Loading…
Reference in New Issue