Skip to content
Snippets Groups Projects

Instead of returning false which fails to complete in some cases. I...

1 file
+ 10
10
Compare changes
  • Side-by-side
  • Inline
+ 10
10
@@ -89,17 +89,17 @@
if (titleSelector === null || linkSelector === null) {
return false;
}
if (titleSelector.replace('-title', '') !== linkSelector.replace('-uri', '')) {
return false;
}
if ($linkTitle.length > 0) {
if (!$linkTitle.val() || $linkTitle.hasClass('link-widget-title--auto')) {
// Set value to the label.
$linkTitle.val(ui.item.label);
// Flag title as being automatically set.
$linkTitle.addClass('link-widget-title--auto');
}
if (titleSelector.replace('-title', '') === linkSelector.replace('-uri', '')) {
if ($linkTitle.length > 0) {
if (!$linkTitle.val() || $linkTitle.hasClass('link-widget-title--auto')) {
// Set value to the label.
$linkTitle.val(ui.item.label);
// Flag title as being automatically set.
$linkTitle.addClass('link-widget-title--auto');
}
}
}
}
event.target.value = ui.item.path;
Loading