diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -516,7 +516,7 @@ 'rsrc/js/phui/behavior-phui-timer-control.js' => 'f84bcbf4', 'rsrc/js/phuix/PHUIXActionListView.js' => 'c68f183f', 'rsrc/js/phuix/PHUIXActionView.js' => 'aaa08f3b', - 'rsrc/js/phuix/PHUIXAutocomplete.js' => '8f139ef0', + 'rsrc/js/phuix/PHUIXAutocomplete.js' => '2fbe234d', 'rsrc/js/phuix/PHUIXButtonView.js' => '55a24e84', 'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bdce4d78', 'rsrc/js/phuix/PHUIXExample.js' => 'c2c500a7', @@ -872,7 +872,7 @@ 'phui-workpanel-view-css' => '3ae89b20', 'phuix-action-list-view' => 'c68f183f', 'phuix-action-view' => 'aaa08f3b', - 'phuix-autocomplete' => '8f139ef0', + 'phuix-autocomplete' => '2fbe234d', 'phuix-button-view' => '55a24e84', 'phuix-dropdown-menu' => 'bdce4d78', 'phuix-form-control-view' => '38c1f3fb', @@ -1173,6 +1173,12 @@ 'phuix-autocomplete', 'javelin-mask', ), + '2fbe234d' => array( + 'javelin-install', + 'javelin-dom', + 'phuix-icon-view', + 'phabricator-prefab', + ), '308f9fe4' => array( 'javelin-install', 'javelin-util', @@ -1634,12 +1640,6 @@ '8e2d9a28' => array( 'phui-theme-css', ), - '8f139ef0' => array( - 'javelin-install', - 'javelin-dom', - 'phuix-icon-view', - 'phabricator-prefab', - ), '8f959ad0' => 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 @@ -555,6 +555,13 @@ if (prefix) { var pattern = new RegExp(prefix); if (!trim.match(pattern)) { + // If the prefix pattern can not match the text, deactivate. (This + // check might need to be more careful if we have a more varied + // set of prefixes in the future, but for now they're all a single + // prefix character.) + if (trim.length) { + this._deactivate(); + } return; } trim = trim.replace(pattern, '');