diff --git a/src/applications/search/controller/search/PhabricatorSearchController.php b/src/applications/search/controller/search/PhabricatorSearchController.php index 1fd9d966a0..23456c2f85 100644 --- a/src/applications/search/controller/search/PhabricatorSearchController.php +++ b/src/applications/search/controller/search/PhabricatorSearchController.php @@ -46,7 +46,8 @@ final class PhabricatorSearchController $query_str = $request->getStr('query'); $pref_jump = PhabricatorUserPreferences::PREFERENCE_SEARCHBAR_JUMP; - if ($user && $user->loadPreferences()->getPreference($pref_jump, 1)) { + if ($request->getStr('jump') != 'no' && + $user && $user->loadPreferences()->getPreference($pref_jump, 1)) { $response = PhabricatorJumpNavHandler::jumpPostResponse($query_str); } else { $response = null; @@ -156,6 +157,14 @@ final class PhabricatorSearchController $search_form ->setUser($user) ->setAction('/search/') + ->appendChild( + phutil_render_tag( + 'input', + array( + 'type' => 'hidden', + 'name' => 'jump', + 'value' => 'no', + ))) ->appendChild( id(new AphrontFormTextControl()) ->setLabel('Search') diff --git a/src/applications/search/controller/search/__init__.php b/src/applications/search/controller/search/__init__.php index ebb1630dc5..a2fd9df50d 100644 --- a/src/applications/search/controller/search/__init__.php +++ b/src/applications/search/controller/search/__init__.php @@ -27,6 +27,7 @@ phutil_require_module('phabricator', 'view/form/control/text'); phutil_require_module('phabricator', 'view/form/control/tokenizer'); phutil_require_module('phabricator', 'view/layout/panel'); +phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils');