Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Fix: ensure geopicker is loaded for non-nested setgeopoint actions #904

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eyelidlessness
Copy link
Contributor

@eyelidlessness eyelidlessness commented Jun 7, 2022

This addresses discrepancies in the DOM representation similar to those found in #903. I'm not totally confident this selector is safe, but it handles all of the cases I was able to identify, without reintroducing the duplicate-widget bug fixed in #896.

Edit: branched from #903 because the form under test depends on that fix.

Current behavior:

1. Actions defined in the model, or in the body *adjacent* its input, populate the model correctly.
2. Actions nested within their input, with an explicit `ref` attribute, fail to update the view. This is because there is a hidden HTML input representing the action (distinct from the input representing the model value), which the current behavior selects.
3. Actions nested within their input, *without* an explicit `ref` attribute, replace the entire descendant tree of the model with the geopoint value. The cause is identical to the explicit-ref case, but the erroneously selected input has no `name` attribute. This causes the model update, in `Nodeset.setVal`, to evaluate against a nodeset resolving to the root `data` node.
@eyelidlessness eyelidlessness force-pushed the fix/geopicker-selector branch from d9ca4a6 to e537627 Compare June 7, 2022 22:48
@eyelidlessness eyelidlessness force-pushed the fix/geopicker-selector branch from e537627 to ddd5e0b Compare June 7, 2022 22:52
@lognaturel lognaturel marked this pull request as draft June 14, 2022 19:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant