Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only extract value meta when element is not a form, closes #2680 #2682

Closed
wants to merge 1 commit into from

Conversation

rktjmp
Copy link
Contributor

@rktjmp rktjmp commented Jun 10, 2023

extractMeta receives a "root element".

When this element is an input, we want to retrieve the current value.

When the element is a form, form.key will look up any inputs in the form with the name "key". If an input has the name "value", then we would retrieve the input element as the value, instead of getting the value of an input.

We explicitly avoid getting the value of a form to avoid this edgecase.

At time of writing, the value attribute is valid on button, data, input, li, meter, option, progress and param tags.

See also #2680 (comment)

…ramework#2680

`extractMeta` receives a "root element".

When this element is an input, we want to retrieve the current value.

When the element is a form, `form.key` will look up any inputs in the
form with the name "key". If an input has the name "value", then we would
retrieve the input element *as the value*, instead of getting the value
of an input.

We explicitly avoid getting the value of a form to avoid this edgecase.

At time of writing, the value attribute is valid on button, data, input,
li, meter, option, progress and param tags.
@rktjmp
Copy link
Contributor Author

rktjmp commented Jun 10, 2023

Alternatively, el.value could be checked it's not instanceof Element.

@rktjmp rktjmp deleted the fix-2680 branch June 12, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant