WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Real Estate Mortgage Calculator
Inputs not working properly in Chrome and IE (1 post)

  1. sebgc
    Member
    Posted 1 year ago #

    I've identified the cause of this problem which occurs in Chrome and IE, but not Firefox.

    The issue is caused by the use of onkeydown as the trigger event to call the thousands/decimal string separator function addSeparatorsNF().

    Though I'm not sure why FF interprets this differently, it looks like addSeparatorsNF is effected before the change is registered to the input's value, thus addSeparatorsNF runs, outputs the updated default value, and the typed number is added to the end of the returned default value as this is where cursor is pushed to after the function executes.

    I guess it's not so much a bug with the plugin code as it is a browser interpretation issue, and for now the simplest fix seems to be using onchange as event trigger (not intuitive) or a submit button instead of auto updating. Alternatively a setTimeout delay might be a worthwhile fix.

    Additionally, there seems to be duplicate functions within the .js file, e.g. xdelay1(), xdelay2() etc. I haven't looked at them all but at a glance they seemed to be unused duplicate functions, so I have deleted them from my implementation without any apparent malfunctions.

    http://wordpress.org/extend/plugins/advanced-real-estate-mortgage-calculator/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic