3

When following the official steps to create a Lightning app and Lightning components from a Visualforce page, components ui:inputNumber, ui:outputNumber and others related to displaying numbers don't work properly. This happens in all browsers and in the Salesforce1 app. The most detailed error message I get is "undefined is not an object (evaluating 'this.$symbols$["zeroDigit"].charCodeAt')"

When running my components from a straight Lightning app, $Locale is initialized and everything works fine.

Here is a minimal code example to show the problem Visualforce page, SimpleTestPage.page:

<apex:page showHeader="false" docType="html-5.0">
<apex:includeScript value="/lightning/lightning.out.js" />

<div id="lightning" />

<script>
$Lightning.use("c:SimpleTestApp", function() {
$Lightning.createComponent("c:SimpleTestCmp",
{ "simpleNumber": 10 },
"lightning",
function(cmp) {
// do some stuff
});
});
</script>
</apex:page>

Lightning app, SimpleTestApp.app:

<aura:application access="GLOBAL" extends="ltng:outApp">
<aura:dependency resource="c:SimpleTestCmp" />
</aura:application>

Lightning component, SimpleTestCmp.cmp:
<aura:component >
<aura:attribute name="simpleNumber" type="Decimal" default="100"/>

<!-- ui:inputNumber displays but shows this error. -->
<!-- afterRender threw an error in 'markup://ui:inputNumber' : Cannot read property 'charCodeAt' of undefined -->
<ui:inputNumber label="Simple" value="{!v.simpleNumber}" />

<!-- ui:outputNumber doesn't display at all, shows this error. -->
<!-- Uncaught error in $A.run() : Cannot read property 'charCodeAt' of undefined -->
<!-- ui:outputNumber value="{!v.simpleNumber}" / -->
</aura:component>
1
  • afterRender threw an error in 'markup://ui:inputNumber' : Unable to get property 'charCodeAt' of undefined or null reference Commented Nov 4, 2015 at 23:11

1 Answer 1

5

This issue has been fixed with the latest patch to Winter'16 and as of this morning all instances should have the fix in place.

4
  • would be a great help if you can post the workaround
    – Rao
    Commented Nov 4, 2015 at 23:31
  • 2
    The workaround introduces an extra server trip and I am concerned that once I put it out there its going to stick and eventually come back as a new case about performance. Commented Nov 4, 2015 at 23:38
  • @dough lol do what you feel is right :). I don't have any need only curious to know the fix
    – Rao
    Commented Nov 4, 2015 at 23:39
  • @dough Duh took a while to figure out the fix, got it :D, ah feel so better to see the error gone now :P. Clue to solve this is error : developer.salesforce.com/forums/?id=906F00000005HzpIAE
    – Rao
    Commented Nov 5, 2015 at 1:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .