function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nikki Phillips 8Nikki Phillips 8 

Fomatting a decimal variable to decimal places loses formatting in firefox

I have a decimal variable value I set scale two decimal places that is displayed into an input field. The visualforce page uses dynamic updating of this field and it works great. The problem is when I use firefox all decimal fomatting is removed, its like it turns to an int. (the unitPriceDisplay populates the excl input field). I cannot use the currency formatting field because of a calculation I am not saving to the record for limit purposes.
how it looks ext class:
decimal unitPriceDisplay = eprb.UnitPrice__c.setScale(2, RoundingMode.HALF_UP);
How it looks VisualForce:
<apex:input required="true" value="{!unitPriceDisplay}" type="number" 
label="{!IF(showInclusivePrices, $Label.ExclPrice, ObjectType.EventPackageRevenueBreakdown__c.fields.UnitPrice__c.label)}"
onChange="UpdateInclusivePrice()">
</apex:input>

What it looks like in chrome:
User-added image
How it looks on Firefox:
User-added image
Madhu MMadhu M
Hi Nikki,

Use below line to fix in style

-moz-appearance:textfield;

Thanks,
Madhu
Nikki Phillips 8Nikki Phillips 8
@Madhu M where do I put that?