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>