Last active
August 29, 2015 14:07
-
-
Save daronspence/9179023c8e956e99974e to your computer and use it in GitHub Desktop.
ACF G-Map Bug Fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LINE 3927 of input.js | |
///////////////////////////// | |
// OLD CODE | |
//////////////////////////// | |
// update inputs | |
this.$el.find('.input-lat').val( lat ); | |
this.$el.find('.input-lng').val( lng ).trigger('change'); | |
//////////////////////////// | |
// NEW CODE | |
/////////////////////////// | |
var oldLat = this.$el.find('.input-lat').val(); | |
var oldLng = this.$el.find('.input-lng').val( lng ); | |
// update inputs | |
this.$el.find('.input-lat').val( lat ); | |
this.$el.find('.input-lng').val( lng ); | |
// fire the change trigger only on real changes | |
if (oldLat != lat || oldLng != lng) { | |
this.$el.find('.input-lng').trigger('change'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment