nativescript-community / ui-label

Alternative to the built-in NativeScript Label but with better performance and additional features such as HTML rendering and more.
Apache License 2.0
19 stars 7 forks source link

Bug: cannot read property 'spans' of undefined on link tap #16

Closed bradmartin closed 1 year ago

bradmartin commented 1 year ago

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital letter.

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

MacBook-Pro:nativescript-byram bradmartin$ ns info
✔ Getting NativeScript components versions information...
✔ Component nativescript has 8.4.0 version and is up to date.
✔ Component @nativescript/core has 8.4.4 version and is up to date.
✔ Component @nativescript/ios has 8.4.0 version and is up to date.
✔ Component @nativescript/android has 8.4.0 version and is up to date.
    "@nativescript-community/ui-label": "~1.2.16",
     "@nativescript/ios": "~8.4.0",
    "@nativescript/types": "~8.4.0",
    "@nativescript/webpack": "~5.0.12",

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

Is there any code involved?

 <HTMLLabel
      class="p-y-10 m-b-5"
      fontSize="14"
      fontWeight="normal"
      linkColor="#336699"
      linkUnderline="true"
      [html]="orderConfirmationMessage"
      (linkTap)="onConfirmationLinkTap($event)"
      textWrap="true"
    ></HTMLLabel>
"<p>Your order has been received. You will receive an order confirmation number when your order is in process. Please allow 1 – 2 business days for verifying your insurance coverage & authorizations. If more information is needed, we will contact you.</p> <br/> <p>Once your order ships, you will receive a shipping confirmation with tracking details. To check your order status at any time, view your <a href='https://order_history.com'>Order History.</a></p>"

Can't seem to figure out "when" this started. In this project things were fine a couple months ago with releases. I think the implementation is fine. Just unsure why this happens on the iOS "tap" of the link. I've tried a few different html tags for input but no luck yet.

farfromrefug commented 1 year ago

@bradmartin sorry will fix this right away

bradmartin commented 1 year ago

No rush, I poked around at the source but nothing jumped out to me as to why this was throwing where it did. Thanks though 👍🏻

farfromrefug commented 1 year ago

@bradmartin should be fixed in 1.2.17

bradmartin commented 1 year ago

Confirmed. Thanks

farfromrefug commented 1 year ago

@bradmartin are you sure you install ed 1.2.17? I dont see it on npm :s Not even sure it got published... To be sure i just published 1.2.18

bradmartin commented 1 year ago

i pulled the source here and packed it, already in production. Wasn't sure you were waiting to do the npm release or what  😁

farfromrefug commented 1 year ago

@bradmartin oh ok sorry about that !