Skip to content

Commit 1ccf767

Browse files
Samellaperesothmaneuttvanellefotso21-crypto
authored andcommitted
IMPROVEMENT: Text edition should have a clear exit option (closes #371).
Co-authored-by: Othmane Houasli <othmane.houasli@utt.fr> Co-authored-by: Vanelle Fotso <vanellefotso21@gmail.com>
1 parent 38dc99e commit 1ccf767

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

frontend/src/components/EditableText.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ function EditableText({id, text, rubric, isPartOf, links, beingEditedBy, fragmen
156156
<textarea className="form-control" type="text" rows="5" autoFocus
157157
value={editedText} onChange={handleChange} onBlur={handleBlur}
158158
/>
159+
<button
160+
type="button"
161+
className="btn btn-secondary btn-sm mt-1"
162+
onMouseDown={(e) => e.preventDefault()}
163+
onClick={handleBlur}
164+
>
165+
Save
166+
</button>
159167
</form>
160168
);
161169
}

0 commit comments

Comments
 (0)