Page MenuHomePhabricator

D15040.diff
No OneTemporary

D15040.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' => '0abdd4a8',
+ 'rsrc/js/phuix/PHUIXAutocomplete.js' => '8bbbad27',
'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' => '0abdd4a8',
+ 'phuix-autocomplete' => '8bbbad27',
'phuix-dropdown-menu' => 'bd4c8dca',
'phuix-form-control-view' => '8fba1997',
'phuix-icon-view' => 'bff6884b',
@@ -917,12 +917,6 @@
'javelin-dom',
'javelin-router',
),
- '0abdd4a8' => array(
- 'javelin-install',
- 'javelin-dom',
- 'phuix-icon-view',
- 'phabricator-prefab',
- ),
'0b7a4f6e' => array(
'javelin-behavior',
'javelin-typeahead-ondemand-source',
@@ -1495,6 +1489,12 @@
'javelin-stratcom',
'javelin-vector',
),
+ '8bbbad27' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'phuix-icon-view',
+ 'phabricator-prefab',
+ ),
'8bdb2835' => array(
'phui-fontkit-css',
),
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
@@ -127,13 +127,13 @@
return;
}
- // Get all the text on the current line. If the line begins with
- // whitespace, don't activate: the user is probably typing code or a
+ // Get all the text on the current line. If the line only contains
+ // whitespace, don't actiavte: the user is probably typing code or a
// numbered list.
- var line = area.value.substring(0, head);
+ var line = area.value.substring(0, head - 1);
line = line.split('\n');
line = line[line.length - 1];
- if (line.match(/^\s+/)) {
+ if (line.match(/^\s+$/)) {
return;
}
@@ -223,6 +223,11 @@
break;
}
+ if (!result.autocomplete || !result.autocomplete.length) {
+ hits = null;
+ break;
+ }
+
hits.push(result.autocomplete);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 12, 4:34 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7389263
Default Alt Text
D15040.diff (2 KB)

Event Timeline