Commit 7940fb8
committed
fix: prevent duplicate options and broken focus on answer creation
Remove the premature `update:answer` emit from `createLocalAnswer` in
AnswerInput — after commit 61b3f48 passed the index correctly, both
`updateAnswer` and `onCreateAnswer` were adding the new option, causing
a duplicate (one without server ID, one with) that appeared unsaved.
Also fix a misplaced closing parenthesis in
`QuestionMultipleMixin.deleteOption` where `optionType` was passed as
the second argument to `$nextTick` instead of to `focusIndex`, causing
`focusIndex` to receive `undefined` as the option type and fail to focus
the previous option after deletion.
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>1 parent 797512b commit 7940fb8
3 files changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
355 | 353 | | |
356 | 354 | | |
357 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
271 | | - | |
| 273 | + | |
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| |||
0 commit comments