Bug 176499 - Ellipsis of -webkit-line-clamp disappears sometimes
Summary: Ellipsis of -webkit-line-clamp disappears sometimes
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Other
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 233770
  Show dependency treegraph
 
Reported: 2017-09-07 03:29 PDT by 宋燕
Modified: 2023-05-25 01:06 PDT (History)
4 users (show)

See Also:


Attachments
it's a demo for this bug , click and see the ... will disappear (31.73 KB, application/x-rar)
2017-09-07 03:29 PDT, 宋燕
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description 宋燕 2017-09-07 03:29:13 PDT
Created attachment 320106 [details]
it's a demo for this bug , click and see the ... will disappear

make the style ellipsis over 2 lines, as: 
      div>p {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 20px;
      }

then the dom use "(XXXX)"at the end of the second line ;

    <div>
      <p>中文名称中文名称中文名称中文名称中文名称中文名称中文名称中文名称中文名(中文名称)</p>
      <p>tryencgendafkjsakdfhask dhfkdjshtryencg endafkjsakdfhaskdhfkdjsh(asdfsadfsadf)</p>
    </div>

It looks good so far , for ellipsis with 2 lines . 

Then I change the upper element's height , like a div,  and the '...' disappear ! 

Please check the demo as attached . 

It was found at chrome 版本 59.0.3071.115(正式版本) (32 位) .
Comment 1 Ahmad Saleem 2023-05-20 04:22:51 PDT
I am unable to reproduce this bug in Safari 16.5 and it is matching and clicking on button, just expand red container but does not make ... disappear and it is matching with Chrome Canary 115 and Firefox Nightly 115.

Marking this as 'RESOLVED CONFIGURATION CHANGED', please reopen if it is reproducible. Thanks!
Comment 2 zalan 2023-05-20 05:55:46 PDT
(In reply to Ahmad Saleem from comment #1)
> I am unable to reproduce this bug in Safari 16.5 and it is matching and
> clicking on button, just expand red container but does not make ...
> disappear and it is matching with Chrome Canary 115 and Firefox Nightly 115.
> 
> Marking this as 'RESOLVED CONFIGURATION CHANGED', please reopen if it is
> reproducible. Thanks!
Could you create a test case out of the attached file please?
Comment 3 Ahmad Saleem 2023-05-20 08:50:27 PDT
(In reply to zalan from comment #2)
> (In reply to Ahmad Saleem from comment #1)
> > I am unable to reproduce this bug in Safari 16.5 and it is matching and
> > clicking on button, just expand red container but does not make ...
> > disappear and it is matching with Chrome Canary 115 and Firefox Nightly 115.
> > 
> > Marking this as 'RESOLVED CONFIGURATION CHANGED', please reopen if it is
> > reproducible. Thanks!
> Could you create a test case out of the attached file please?

Here you go - https://jsfiddle.net/wjcgrf4o/

^It uses jQuery, hence I used 'JSFiddle' to link to library.
Comment 4 宋燕 2023-05-25 01:02:42 PDT
Thank you for your reply ! 

Now, this bug is unable to reproduce on my chrome of Version 113.0.5672.126 (Official Build) (x86_64)  in 2023.5.25.
Comment 5 Ahmad Saleem 2023-05-25 01:06:48 PDT
(In reply to 宋燕 from comment #4)
> Thank you for your reply ! 
> 
> Now, this bug is unable to reproduce on my chrome of Version 113.0.5672.126
> (Official Build) (x86_64)  in 2023.5.25.

NOTE - Just to clarify, WebKit Is used by Safari and Chrome has moved to forked version of Blink.

Appreciate if you can confirm if it is solved for you in Safari.