- Issue created by @bkosborne
- πΊπΈUnited States bkosborne New Jersey, USA
I marked π Linkit field doesn't work in nested Paragraph when Auto populate link text is enabled Active as a duplicate of this.
Maintainers, please add users "mahde" and "deulenko" to issue credits.
- Merge request !126Refactor code for field widget that auto populates title to be more precise... β (Open) created by bkosborne
- πΊπΈUnited States bkosborne New Jersey, USA
Okay, I refactored the logic here to be more precise in finding the correct title field to manipulate and to fix things so that if a title field cannot be found, the basic functionality of the selection handler (populating the uri input field with the clicked autocomplete value) still works.
Note that the logic for assigning $context variable is flawed as it doesn't scope correctly when there's no fieldset wrapping the link field (there won't be if the link field doesn't have a title field output).
const $context = $(event.target).closest('form,fieldset,tr');
But as far as I can tell, it's not that important and affects only people using LinkIt with CKE4. Given that's deprecated I think it's best not to touch it.