From 06abeb20105f315891604736d9def9aea599b83b Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 29 Apr 2016 16:37:45 -0700 Subject: [PATCH] Allow tall two-column/curtain headers to be triple-clicked in Firefox Summary: Fixes T10905. In Firefox, triple clicking the new headers doesn't select the entire line, so you can't easily copy/paste an entire task title or revision name. It works fine in Safari/Chrome. This seems to fix that without breaking anything. Test Plan: - Viewed headers in Safari, Firefox, Chrome. - Triple-clicked headers in Safari, Firefox, Chrome. - Viewed tablet/device layouts in Safari, Firefox, Chrome. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10905 Differential Revision: https://secure.phabricator.com/D15823 --- resources/celerity/map.php | 6 +++--- src/view/phui/PHUIHeaderView.php | 9 +++++++++ webroot/rsrc/css/phui/phui-header-view.css | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index d72545dc93..0ec094c82b 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ */ return array( 'names' => array( - 'core.pkg.css' => '04a95108', + 'core.pkg.css' => 'ede6bf7a', 'core.pkg.js' => '6972d365', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '7ba78475', @@ -136,7 +136,7 @@ return array( 'rsrc/css/phui/phui-form-view.css' => '6a51768e', 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', - 'rsrc/css/phui/phui-header-view.css' => '230254d3', + 'rsrc/css/phui/phui-header-view.css' => '9961e480', 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 'rsrc/css/phui/phui-icon.css' => '3f33ab57', @@ -829,7 +829,7 @@ return array( 'phui-form-css' => 'aac1d51d', 'phui-form-view-css' => '6a51768e', 'phui-head-thing-view-css' => 'fd311e5f', - 'phui-header-view-css' => '230254d3', + 'phui-header-view-css' => '9961e480', 'phui-hovercard' => '1bd28176', 'phui-hovercard-view-css' => 'de1a2119', 'phui-icon-set-selector-css' => '1ab67aad', diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php index 8111944c4d..85f55b3ef7 100644 --- a/src/view/phui/PHUIHeaderView.php +++ b/src/view/phui/PHUIHeaderView.php @@ -316,6 +316,15 @@ final class PHUIHeaderView extends AphrontTagView { $header_content); } + // This wrapper element allows titles to be triple-clicked to select them + // in Firefox. See T10905 for discussion. + $header_content = phutil_tag( + 'span', + array( + 'class' => 'phui-header-content', + ), + $header_content); + $left[] = phutil_tag( 'span', array( diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index 2a1731eb61..6cbf3b891a 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -80,6 +80,10 @@ body .phui-header-shell.phui-bleed-header color: {$lightbluetext}; } +.phui-header-content { + display: inline-block; +} + .phui-object-box .phui-header-tall .phui-header-header, .phui-document-view .phui-header-tall .phui-header-header { font-size: 18px;