fix(project): 하위 작업 입력칸 브라우저 자동완성 끄기, 다른 작업 열 때 입력값 비움

- 하위 작업·댓글·섹션/프로젝트 이름 칸에 autocomplete="off" — 크롬/엣지가
  예전에 쳤던 문구 목록을 띄우지 않게.
- 작업 창을 열 때 하위 작업 추가 칸(제목·담당자·마감일)을 비우고 taskId 를
  끊음 — 쓰다 만 제목이 다른 작업으로 따라가거나, 상세 로딩 중 Enter 로
  이전 작업에 붙던 버그 수정.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 10:06:45 +09:00
parent 634c390f7c
commit 07e957a11f
6 changed files with 23 additions and 12 deletions
@@ -12,7 +12,7 @@
<div class="pj-modal" id="pj-modal-project" hidden>
<div class="pj-modal-card">
<h3>새 프로젝트</h3>
<label>이름<input type="text" id="pj-f-name" placeholder="프로젝트 이름" /></label>
<label>이름<input type="text" id="pj-f-name" placeholder="프로젝트 이름" autocomplete="off" /></label>
<label>설명<textarea id="pj-f-desc" rows="2"></textarea></label>
{# 날짜 칸은 project.js enhanceDateInput 이 아사나식 날짜 버튼으로 바꾼다(input 은 숨긴 값 저장소).
label 로 감싸지 않는다 — label 안의 버튼을 누르면 숨긴 input 이 다시 눌리는 문제가 생긴다. #}
@@ -39,7 +39,7 @@
<div class="pj-modal-card">
<h3>프로젝트 수정</h3>
<input type="hidden" id="pj-e-id" />
<label>이름<input type="text" id="pj-e-name" placeholder="프로젝트 이름" /></label>
<label>이름<input type="text" id="pj-e-name" placeholder="프로젝트 이름" autocomplete="off" /></label>
<label>설명<textarea id="pj-e-desc" rows="2"></textarea></label>
{# 마감일 — 오른쪽 달력 아이콘(없으면 점선 원). 시작일은 날짜 팝업의 "+ 시작일"로 — enhanceDateInput(startInput) #}
<div class="pj-field-label pj-field-inline">마감일
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260929c" defer></script>
<script src="/static/project.js?v=20260929d" defer></script>
{% endblock %}
@@ -84,7 +84,7 @@
<span class="material-symbols-outlined">attach_file</span>
<input type="file" id="pj-cm-file-input" multiple hidden />
</label>
<input type="text" id="pj-cm-input" placeholder="댓글 입력… (이미지는 붙여넣기 가능)" />
<input type="text" id="pj-cm-input" placeholder="댓글 입력… (이미지는 붙여넣기 가능)" autocomplete="off" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-cm-send">전송</button>
</div>
</div>
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20260929c" defer></script>
<script src="/static/project.js?v=20260929d" defer></script>
{% endblock %}
@@ -212,7 +212,7 @@
<div class="pj-modal-card">
<h3 id="pj-stage-modal-title">새 섹션</h3>
<input type="hidden" id="pj-stg-id" />
<label>이름<input type="text" id="pj-stg-name" placeholder="섹션 이름" /></label>
<label>이름<input type="text" id="pj-stg-name" placeholder="섹션 이름" autocomplete="off" /></label>
<label>색상
<span class="pj-color-palette" id="pj-stg-colors"></span>
</label>
@@ -365,7 +365,7 @@
</div>
<ul class="pj-subtask-list" id="pj-subtask-list"></ul>
<div class="pj-subtask-form">
<input type="text" id="pj-subtask-input" placeholder="하위 작업 제목…" />
<input type="text" id="pj-subtask-input" placeholder="하위 작업 제목…" autocomplete="off" />
<select id="pj-subtask-add-assignee"><option value="">담당자 없음</option></select>
<input type="date" id="pj-subtask-add-due" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-subtask-add">추가</button>
@@ -415,7 +415,7 @@
바깥이라 끝까지 내려도 마지막 내용은 이 칸 바로 위에서 멈추고 가리지 않는다. -->
<div class="pj-comment-dock" id="pj-comment-dock" hidden>
<div class="pj-comment-form">
<input type="text" id="pj-comment-input" placeholder="댓글을 추가하거나 @로 멤버를 태그하세요" />
<input type="text" id="pj-comment-input" placeholder="댓글을 추가하거나 @로 멤버를 태그하세요" autocomplete="off" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-comment-send">등록</button>
</div>
</div>
@@ -461,7 +461,7 @@
<span class="material-symbols-outlined">attach_file</span>
<input type="file" id="pj-cm-file-input" multiple hidden />
</label>
<input type="text" id="pj-cm-input" placeholder="댓글 입력… (이미지는 붙여넣기 가능)" />
<input type="text" id="pj-cm-input" placeholder="댓글 입력… (이미지는 붙여넣기 가능)" autocomplete="off" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-cm-send">전송</button>
</div>
</div>
@@ -491,5 +491,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260929c" defer></script>
<script src="/static/project.js?v=20260929d" defer></script>
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260929c" defer></script>
<script src="/static/project.js?v=20260929d" defer></script>
{% endblock %}
+12 -1
View File
@@ -5381,7 +5381,10 @@
}
const stageCell = document.querySelector(".pj-meta-cell-stage");
if (stageCell) stageCell.style.display = isSub ? "none" : "";
if (subtaskBlock) el("pj-subtask-block").hidden = !task;
if (subtaskBlock) {
el("pj-subtask-block").hidden = !task;
subtaskBlock.reset();
}
if (linksBlock) el("pj-links-block").hidden = !task || isSub;
if (task) { loadAttachments(task.id); loadComments(task.id); loadTaskExtras(task); }
openSlidePanel(taskModal);
@@ -6579,6 +6582,14 @@
});
return {
// 다른 작업을 열 때 — 추가 칸에 쓰다 만 제목·담당자·마감일이 새 작업으로 따라가지 않게
// 비우고, 상세를 다 받기 전(setContext 전)에 Enter 를 눌러도 이전 작업에 붙지 않게 끊는다.
reset: function () {
taskId = null;
if (input) input.value = "";
if (addAssignee) addAssignee.value = "";
if (addDue) addDue.value = "";
},
setContext: function (opts) {
taskId = opts.taskId; projectId = opts.projectId;
canDeleteFn = opts.canDelete || function () { return false; };