Skip to content

Commit

Permalink
Prevent link selection in Bard Field if cursor is at the end of link (#…
Browse files Browse the repository at this point in the history
…7528)

Fixes #7526
  • Loading branch information
o1y committed Feb 15, 2023
1 parent 23cbd91 commit 21acd1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources/js/components/fieldtypes/bard/Link.js
Expand Up @@ -75,6 +75,8 @@ export const Link = Mark.create({
const range = getMarkRange(doc.resolve(pos), schema.marks.link);

if (range) {
if (range.to === pos) return;

const $start = doc.resolve(range.from);
const $end = doc.resolve(range.to);
const selection = new TextSelection($start, $end);
Expand Down

0 comments on commit 21acd1b

Please sign in to comment.