Fix element focus issue on project creation.

This commit is contained in:
Asaf Gartner 2022-08-07 00:40:05 +03:00
parent d2f44f8e5f
commit 841264de0f
2 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@
font-style: italic;
}
#description.drop {
#full_description.drop {
box-shadow: inset 0px 0px 5px yellow;
}
</style>
@ -151,7 +151,7 @@
<div class="edit-form-row">
<div class="pt-input-ns">Short description:</div>
<div>
<textarea required maxlength="140" name="shortdesc">
<textarea id="description" required maxlength="140" name="shortdesc">
{{- .ProjectSettings.Blurb -}}
</textarea>
<div class="c--dim f7">Plaintext only. No links or markdown.</div>
@ -173,7 +173,7 @@
<div class="edit-form-row">
<div class="pt-input-ns">Full description:</div>
<div>
<textarea id="description" class="w-100 h5 minh-5 mono lh-copy" name="description">
<textarea id="full_description" class="w-100 h5 minh-5 mono lh-copy" name="full_description">
{{- .ProjectSettings.Description -}}
</textarea>
<div class="flex justify-end items-center mt2">
@ -264,7 +264,7 @@
{{ else }}
const projectName = "{{ .Project.Name }}";
{{ end }}
const description = document.querySelector('#description');
const description = document.querySelector('#full_description');
const descPreview = document.querySelector('#desc-preview');
const { clear: clearDescription } = autosaveContent({
inputEl: description,

View File

@ -698,7 +698,7 @@ func ParseProjectEditForm(c *RequestContext) ProjectEditFormResult {
return res
}
links := ParseLinks(c.Req.Form.Get("links"))
description := c.Req.Form.Get("description")
description := c.Req.Form.Get("full_description")
parsedDescription := parsing.ParseMarkdown(description, parsing.ForumRealMarkdown)
lifecycleStr := c.Req.Form.Get("lifecycle")