Do not require selection of autocomplete if only one match (pressing 'Submit' is sufficient)

Created on 9 July 2021, over 3 years ago
Updated 24 June 2024, 6 months ago

Problem/Motivation

If you start linkit to search for an internal node, and you know exactly the ID, our users will type in "/node/<nid>".
If you now klick on OK and you are not selecting the search result, it will insert a link like <a href="/node/nid"...., even if this is an internal link which sould look like this: <a data-entity-substitution="canonical" data-entity-type="node" data-entity-uuid="<uuid>" href="/node/<nid>"...

This leads to wrong links on multilingual sites because drupal is not rendering a prefix like /en/node/<nid> or /fr/node/<nid>. The inserted link will be treated like an external link.

Steps to reproduce

  1. Open a Page
  2. Start linkit
  3. Type in a known node id "/node/<nid>"
  4. Click OK
  5. Check inserted link

Proposed resolution

If only one result was found and this is matching the input, it should insert the internal link.

✨ Feature request
Status

Fixed

Version

6.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany dbielke1986

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024