Page MenuHomePhabricator

D15041.diff
No OneTemporary

D15041.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -507,7 +507,7 @@
'rsrc/js/phui/behavior-phui-object-box-tabs.js' => '2bfa2836',
'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8',
'rsrc/js/phuix/PHUIXActionView.js' => '8cf6d262',
- 'rsrc/js/phuix/PHUIXAutocomplete.js' => '8bbbad27',
+ 'rsrc/js/phuix/PHUIXAutocomplete.js' => 'fc10c813',
'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bd4c8dca',
'rsrc/js/phuix/PHUIXFormControl.js' => '8fba1997',
'rsrc/js/phuix/PHUIXIconView.js' => 'bff6884b',
@@ -836,7 +836,7 @@
'phui-workpanel-view-css' => 'adec7699',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '8cf6d262',
- 'phuix-autocomplete' => '8bbbad27',
+ 'phuix-autocomplete' => 'fc10c813',
'phuix-dropdown-menu' => 'bd4c8dca',
'phuix-form-control-view' => '8fba1997',
'phuix-icon-view' => 'bff6884b',
@@ -1489,12 +1489,6 @@
'javelin-stratcom',
'javelin-vector',
),
- '8bbbad27' => array(
- 'javelin-install',
- 'javelin-dom',
- 'phuix-icon-view',
- 'phabricator-prefab',
- ),
'8bdb2835' => array(
'phui-fontkit-css',
),
@@ -2092,6 +2086,12 @@
'javelin-behavior-device',
'phabricator-keyboard-shortcut',
),
+ 'fc10c813' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'phuix-icon-view',
+ 'phabricator-prefab',
+ ),
'fc91ab6c' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
--- a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
+++ b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
@@ -600,19 +600,26 @@
return false;
}
- // If the user types a string like "@username:" (with a trailing comma),
+ // If the user types a string like "@username:" (with a trailing colon),
// then presses tab or return to pick the completion, don't destroy the
// trailing character.
var suffixes = this._getSuffixes();
var value = this._value;
+ var found_suffix = false;
for (var ii = 0; ii < suffixes.length; ii++) {
var last = value.substring(value.length - suffixes[ii].length);
if (last == suffixes[ii]) {
ref += suffixes[ii];
+ found_suffix = true;
break;
}
}
+ // If we didn't find an existing suffix, add a space.
+ if (!found_suffix) {
+ ref = ref + ' ';
+ }
+
area.value = text.substring(0, head - 1) + ref + text.substring(tail);
var end = head + ref.length;

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 6:45 AM (2 d, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390177
Default Alt Text
D15041.diff (2 KB)

Event Timeline