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

Add coverage for focus and value preservation during morph #1064

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

seanpdoyle
Copy link
Contributor

Idiomorph will preserve focus, but discard content. Version 0.0.9 introduces the ignoredActiveValue: option to preserve the value for the element with focus. Since the currently packaged build isn't caught up to that version, the [data-turbo-permanent] treatment enables a similar kind of behavior.

This commit adds test coverage to ensure that focus preservation is global, and value preservation requires opt-in with [data-turbo-permanent].

Idiomorph will preserve focus, but discard content. Version [0.0.9][]
introduces the `ignoredActiveValue:` option to preserve the value for
the element with focus. Since the currently packaged build isn't caught
up to that version, the `[data-turbo-permanent]` treatment enables a
similar kind of behavior.

This commit adds test coverage to ensure that focus preservation is
global, and value preservation requires opt-in with
`[data-turbo-permanent]`.

[0.0.9]: https://github.com/bigskysoftware/idiomorph/tree/v0.0.9#options
@seanpdoyle
Copy link
Contributor Author

@afcapel this should be easy to review, there aren't any implementation changes.

Copy link
Collaborator

@afcapel afcapel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @seanpdoyle

@afcapel afcapel merged commit a247b35 into hotwired:main Nov 14, 2023
1 check passed
@seanpdoyle seanpdoyle deleted the preserve-focus-and-value branch November 14, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants