codersgrave / Facebook-Friend-Selector

This repo is no longer maintained. Feel free to fork and update!
http://facebook-friend-selector.codersgrave.com
64 stars 22 forks source link

Bug with max friends limit #3

Closed poliver-zz closed 11 years ago

poliver-zz commented 11 years ago

i've found that if you set the option "max" to, for example, 1 the script prevents you from selecting more than one only if you click in the user's name but not if you click the checkbox (i was able to select and get 3 friend's IDs besides restricting to max 1).

The temporary solution i've found was to add this line on the "click" function (under the "else" clause):

if (limit_state === false) {
        btn.find('input.fs-friends').attr('checked', false); // ADDED

        return false;
 }

Hope this helps to correctly fix it.

sevilyilmaz commented 11 years ago

@poliver Thanks for this quick solution. I started to refactor the plugin. Until then it suits perfectly