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

Link Type loses selection when moving link field down in Vizy field #276

Open
BenParizek opened this issue Jan 23, 2024 · 0 comments
Open

Comments

@BenParizek
Copy link

If you create a Vizy field with a custom block where the Link Field is used in the custom block, you can drag/drop the block higher in the Vizy layout, however, when you drag the block lower in the layout, the Link field loses focus.

This seems to be because when moving the block higher in the layout, the LinkField.js::init method is not fired and when moving it down the init method is fired. Due to the way LinkField currently stores the field data, the dropdown for the LinkType field never appears to get 'selected' attribute added in the HTML, and the js logic uses this.$typeSelect.val() to retrieve the dropdown value and that code returns null when the 'selected' attribute is missing.

link-field-loses-selection.mp4
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

No branches or pull requests

1 participant