1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-29 16:08:22 +01:00

Push typehead browse result selector button down one <div>

Summary: Fixes T11190. The div with all the stuff in it was sometimes ending up on top of the "select" button, making it unclickable.

Test Plan: Clicked "select" in several browsers.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11190

Differential Revision: https://secure.phabricator.com/D16160
This commit is contained in:
epriestley 2016-06-21 15:11:04 -07:00
parent f38730aab8
commit 921a5b4941

View file

@ -143,8 +143,6 @@ final class PhabricatorTypeaheadModularDatasourceController
$items = array(); $items = array();
foreach ($results as $result) { foreach ($results as $result) {
$information = $this->renderBrowseResult($result);
// Disable already-selected tokens. // Disable already-selected tokens.
$disabled = isset($exclude[$result->getPHID()]); $disabled = isset($exclude[$result->getPHID()]);
@ -161,15 +159,14 @@ final class PhabricatorTypeaheadModularDatasourceController
), ),
pht('Select')); pht('Select'));
$information = $this->renderBrowseResult($result, $button);
$items[] = phutil_tag( $items[] = phutil_tag(
'div', 'div',
array( array(
'class' => 'typeahead-browse-item grouped', 'class' => 'typeahead-browse-item grouped',
), ),
array( $information);
$button,
$information,
));
} }
$markup = array( $markup = array(
@ -352,7 +349,10 @@ final class PhabricatorTypeaheadModularDatasourceController
->appendChild($view); ->appendChild($view);
} }
private function renderBrowseResult(PhabricatorTypeaheadResult $result) { private function renderBrowseResult(
PhabricatorTypeaheadResult $result,
$button) {
$class = array(); $class = array();
$style = array(); $style = array();
$separator = " \xC2\xB7 "; $separator = " \xC2\xB7 ";
@ -399,6 +399,7 @@ final class PhabricatorTypeaheadModularDatasourceController
'style' => implode(' ', $style), 'style' => implode(' ', $style),
), ),
array( array(
$button,
$name, $name,
$attributes, $attributes,
)); ));