question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Placeholder text on Dropin form appears encoded incorrectly

See original GitHub issue

General information

  • SDK/Library version: 1.4.0
  • Environment: Sandbox
  • Browser and OS Tested across all standard up to date browsers in Windows 7 and Ubuntu 14.04

Issue description

Greetings,

I am in the process of migrating from hosted fields to Dropin V3. The only issue I cannot seem to get resolved is the placeholder text appears to have an encoding issue.

Note the placeholder below. It is a similar case on the CVV field.

<input type="tel" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" class="number" data-braintree-name="number" name="credit-card-number" id="credit-card-number" maxlength="22" placeholder="•••• •••• •••• ••••" aria-invalid="true">

Please let me know if I can provide any other app specific details that might be helpful. Coffeescript:

  braintree.dropin.create {
    authorization: gon.client_token
    container: '#dropin-container'
    locale: 'en_US'
  }, (createErr, instance) ->
    form.addEventListener 'submit', (event) ->
      event.preventDefault()
      instance.requestPaymentMethod (err, payload) ->
        if err
          console.log 'Error', err
          return
        # Add the nonce to the form and submit
        document.querySelector('#nonce').value = payload.nonce
        form.submit()
        return
      return
    return

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kriocommented, Jul 29, 2018

I had the same problem when I manually copied the dropin.min.js file and pasted it locally. Calling straight from the cdn or downloading it and saving has fixed the issue originally described for me.

<script src="https://js.braintreegateway.com/web/dropin/1.11.0/js/dropin.min.js"></script>

0reactions
crookedneighborcommented, Jul 12, 2019

Going to close this, because I think the problem seems to be from the source computer copying the encoding incorrectly. When used from the CDN with the correct character set encoding, it should not display incorrectly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Placeholder text set by javascript not decoding HTML ...
In Javascript, special characters are encoded with \uXXXX (Like \u00C9 ) ... the button to change the placeholder text of the text field....
Read more >
Encoding problem with placeholders in CMS 12
In the Placeholder field we write "Platshållartext" but when the field in rendered the placeholder text is "Platshållartext".
Read more >
Custom card integration - Adyen Docs
For web: Build your own UI for the card payment form, and then use our Custom Card Web Component to collect, validate, and...
Read more >
The Anatomy of Accessible Forms - Deque Systems
A Placeholder Is Not a Replacement for Visible Labels. In recent years, placeholders are being used to provide visible labels for the form ......
Read more >
Premiere pro export glitch
264 in the video format and select a particular quality, it will directly be ... this problem, I switched from Hardware Encoding to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found