Skip to content

Doesn't work with even line number #90

@brindalakhani

Description

@brindalakhani

Hello,

I've come across an interesting bug using this library.

Steps 1 : Add this code
<HTMLEllipsis unsafeHTML='simple html content' maxLine="2" ellipsis="..." basedOn="letters" />

Step 2: Check in a web browser.

Chrome behavior :
For the first time, It trims perfectly and display ... at line number 2. But When you reload the page It shows ... at line number 3.

Firefox and Safari behavior:
It trims at line number 3 instead of line number 2.

Seems like, maxLine attribute doesn't work with even line number value(Ex: 2, 4, 6, 8 so on).

My browser details -

  1. Chrome : Version 94.0.4606.61 (Official Build) (x86_64)
  2. Safari : Version 14.0.3 (16610.4.3.1.4)
  3. Firefox : 92.0.1 (64-bit)

Please have a look into it .

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions