Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Jan 23, 2025
1 parent bcd529b commit 64e21e3
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions resources/js/components/fieldtypes/bard/LinkToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ export default {
watch: {
linkType() {
this.setTarget();
this.autofocus();
},
Expand Down Expand Up @@ -364,9 +365,7 @@ export default {
this.rel = attrs.href
? attrs.rel
: this.defaultRel;
this.targetBlank = attrs.href
? attrs.target === '_blank'
: this.config.target_blank;
this.targetBlank = true;
},
autofocus() {
Expand All @@ -379,6 +378,18 @@ export default {
}
},
setTarget() {
if (this.linkType === 'url') {
this.targetBlank = true;
this.title = 'Open in new window';
return;
}
this.targetBlank = this.config.target_blank;
this.title = null;
},
setUrl(type, url) {
this.url = {
...this.url,
Expand Down

0 comments on commit 64e21e3

Please sign in to comment.