I had created a apex:inputField in my VF page and it was working fine. But when I checked this on chrome today, it didn't work. It is working fine on fire-fox but there seems to be an issue with chrome in calling onfocus event.

<apex:inputField value="{!exp.Type__c}" onfocus="onExpenseTypeFocus(this);" />

Can anyone please help ?

  • Is there an error when you check the console? Nov 11, 2013 at 14:37

2 Answers 2


I have tested this in my version of Chrome (Version 30.0.1599.101) and it seems fine...

<apex:inputField value="{!Test__c.Text__c}" 
         onfocus="this.style.background = 'red';" 
         onblur="this.style.background = 'white';"/>

enter image description here

enter image description here

Can you try usin the Developer Tools under the View > Developer menu, you may have some errors in your onExpenseTypeFocus method?

enter image description here

enter image description here

  • Thanks for your response. I was facing this with picklist values in chrome. Actually, I was enabling and disabling all fields and it seems that chrome was getting in an unknown situation due to this. I have now found a work-around for this. Again thanks for your reply.
    – S.Sharma
    Nov 12, 2013 at 16:30
  • Your welcome, glad you got it working! Do make sure to check if this answer was correct in respect to the question answered for future readers. Nov 12, 2013 at 16:32

Did you recently upgrade Chrome? There is currently a known issue on displaying Visualforce pages on Chrome version 31.


You must log in to answer this question.

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