From 2fed5b69257ddfde440d13806a938c585cce3340 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 8 Mar 2017 17:52:57 -0800 Subject: [PATCH] Fourth fix for the magical world of crumbs and text-overflow Summary: The Safari hack in place casued a truncation issue in Firefox, so that hack is now gone. Instead the bug appears to be the creative inclusion of "space". In fiddling with this adding one space inside the span and one space outside the span seems to resolve all cases. Test Plan: Chrome, Safari, Firefox. Test "hector" and copy paste of a Task ID. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17483 --- resources/celerity/map.php | 6 +++--- src/view/phui/PHUICrumbView.php | 6 +++++- webroot/rsrc/css/phui/phui-crumbs-view.css | 7 ------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 86de05e9bb..3e1a4ac992 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => '6875302f', 'conpherence.pkg.js' => '6249a1cf', - 'core.pkg.css' => '7e10ec60', + 'core.pkg.css' => 'db710bcc', 'core.pkg.js' => '1fa7c0c5', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '90b30783', @@ -139,7 +139,7 @@ return array( 'rsrc/css/phui/phui-cms.css' => '504b4b23', 'rsrc/css/phui/phui-comment-form.css' => '48fbd65d', 'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad', - 'rsrc/css/phui/phui-crumbs-view.css' => 'ccbf2a0c', + 'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb', 'rsrc/css/phui/phui-curtain-view.css' => '947bf1a4', 'rsrc/css/phui/phui-document-pro.css' => 'f56738ed', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', @@ -850,7 +850,7 @@ return array( 'phui-cms-css' => '504b4b23', 'phui-comment-form-css' => '48fbd65d', 'phui-comment-panel-css' => 'f50152ad', - 'phui-crumbs-view-css' => 'ccbf2a0c', + 'phui-crumbs-view-css' => '6ece3bbb', 'phui-curtain-view-css' => '947bf1a4', 'phui-document-summary-view-css' => '9ca48bdf', 'phui-document-view-css' => 'c32e8dec', diff --git a/src/view/phui/PHUICrumbView.php b/src/view/phui/PHUICrumbView.php index 392a354123..68c43be4e3 100644 --- a/src/view/phui/PHUICrumbView.php +++ b/src/view/phui/PHUICrumbView.php @@ -75,7 +75,7 @@ final class PHUICrumbView extends AphrontView { // Surround the crumb name with spaces so that double clicking it only // selects the crumb itself. - $name = array(' ', $this->name, ' '); + $name = array(' ', $this->name); $name = phutil_tag( 'span', @@ -84,6 +84,10 @@ final class PHUICrumbView extends AphrontView { ), $name); + // Because of text-overflow and safari, put the second space on the + // outside of the element. + $name = array($name, ' '); + $divider = null; if (!$this->isLastCrumb) { $divider = id(new PHUIIconView()) diff --git a/webroot/rsrc/css/phui/phui-crumbs-view.css b/webroot/rsrc/css/phui/phui-crumbs-view.css index 3428a9cda0..6155e9b2b8 100644 --- a/webroot/rsrc/css/phui/phui-crumbs-view.css +++ b/webroot/rsrc/css/phui/phui-crumbs-view.css @@ -54,13 +54,6 @@ text-overflow: ellipsis; } -/* Safari Hack, See D17361 */ -.phui-crumb-view:after { - content: "\0000a0"; - display: inline-block; - width: 0; -} - .device-phone .phui-crumb-view.phabricator-last-crumb .phui-crumb-name, .device-phone .phui-crumb-view.phui-crumb-has-icon, .device-phone .phui-crumb-has-icon + .phui-crumb-divider {