Skip to content

buggy interaction with option checkboxes, additional inputs and autosave in certain situations #1406

@MyPyDavid

Description

@MyPyDavid

Description / Beschreibung

Some errors (JS and a validation conflict) can occur when filling out the additional input of an option and clicking the checkbox.

Expected behaviour / Erwartetes Verhalten

That these situations don't yield errors.

Steps to reproduce / Schritte zum Reproduzieren

Here are several situations that can be reproduced.

  • when pressing a key (i.e. aaaaaaaaaa) and then clicking the checkbox leads to:
Uncaught TypeError: can't access property "text", value is undefined
    update webpack://rdmo/./rdmo/projects/assets/js/interview/factories/ValueFactory.js?:60
    updateValue webpack://rdmo/./rdmo/projects/assets/js/interview/actions/interviewActions.js?:431
    bindActionCreator Redux
    handleAdditionalValueChange webpack://rdmo/./rdmo/projects/assets/js/interview/components/main/widget/CheckboxInput.js?:72
  • when typing normal and checking the checkbox just before the autosave leads to STORE_VALUE_ERROR
XHRPOST
http://localhost:8000/api/v1/projects/projects/18/values/
[HTTP/1.1 400 Bad Request 115ms]

conflict	[ "An existing value for this attribute/set_prefix/set_index/collection_index was found." ]
  • when typing normal and unchecking the checkbox before autosave (no error, just a 404 in JS console)
XHRPUT
http://localhost:8000/api/v1/projects/projects/18/values/3117/
[HTTP/1.1 404 Not Found 641ms]

detail	"No Value matches the given query."
  • when adding text to a checked checkbox and then unchecking it, the autosave makes it appear again

Context / Kontext

2.3.2

References / Verweise

Metadata

Metadata

Assignees

No one assigned

    Labels

    javascriptPull requests that update Javascript code

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions