Skip to content

[Live] Fixing bug where the active input would maintain its value, but lose its cursor position #1501

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

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

weaverryan
Copy link
Member

Q A
Bug fix? yes
New feature? no
Issues Fix #1490
License MIT

This only affects "model" elements, as unmapped element changes are tracked and the "to" element's value updated in the beforeNodeMorphed() callback.

Also, this setting matches Turbo 8. This also updates Idiomorph to the absolute latest version, which includes a related bug fix.

Cheers!

@@ -27,7 +27,7 @@
}
},
"dependencies": {
"idiomorph": "^0.3.0"
"idiomorph": "https://github.com/bigskysoftware/idiomorph.git"
Copy link
Member

Choose a reason for hiding this comment

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

Sure about this ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, but good question. Copied from Turbo - it allows us to get the absolute latest version. Will change after they tag next. We embed this library (for now), so this isn't exposed to the user.

// a special case: replacing the value isn't enough. We need to
// prevent the value from being changed in the first place so the
// user's cursor position is maintained.
ignoreActiveValue: true,
Copy link
Member

Choose a reason for hiding this comment

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

\o/ As we suspected 🕵️ 🕵️

@smnandre
Copy link
Member

Checked on the demos: 👍

@weaverryan weaverryan force-pushed the live-fix-active-input-cursor branch from 137b5d5 to d3d475a Compare February 16, 2024 17:40
@weaverryan weaverryan merged commit 9e139d8 into symfony:2.x Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[InlineEdit] Unable to edit text field as a prepend
3 participants