web: behaviour: fix tooltip on pipeline names

It was no longer being displayed after a regression in
concourse/concourse#5778 since the dom id was being applied to the full
width of the pipeline element rather than the text element itself,
meaning the `clientWidth` never differed from the `scrollWidth`. This
results in us not knowing when the text is ellipsized.

Signed-off-by: Aidan Oldershaw <aoldershaw@pivotal.io>
This commit is contained in:
Aidan Oldershaw 2020-07-07 17:22:39 -04:00
parent 451b01062f
commit 6cea828414
1 changed files with 3 additions and 2 deletions

View File

@ -77,13 +77,14 @@ viewPipeline p =
++ [ href <| p.href
, onMouseEnter <| Hover <| Just <| p.domID
, onMouseLeave <| Hover Nothing
, id <| toHtmlID p.domID
]
)
[ Html.div
(Styles.pipelineIcon p.icon)
[]
, Html.div
(Styles.pipelineName p.name)
(id (toHtmlID p.domID)
:: Styles.pipelineName p.name
)
[ Html.text p.name.text ]
]