Hi,
I am working with module, I found the username ('content/bulkauthorupdate') autocomplete field is not working properly and onclick on outside the field, drop down is not getting closed.
I am wondering that Drupal form api autocomplete is better than using js.
Thanks,
Harish
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | autocomplete_not_working-2820339-6.patch | 669 bytes | silvi.addweb |
| #3 | autocomplete_notworking_properly.png | 43.66 KB | harish b |
| #2 | autocomplete_not_working-2820339-2.patch | 527 bytes | silvi.addweb |
| bulkauthorupdate_autocompleterror.png | 44.53 KB | harish b |
Comments
Comment #2
silvi.addweb commentedPFA patch to resolve an issue.
Comment #3
harish b commentedHi Tejal Patel,
Thanks for your patch, I reviewed it but autocomplete complete not working properly.
Scenario: When i gave two letters input in auto complete field. Suggestions are working properly in drop down but after selecting one of the user, Drop down should close automatically.
Changing status to Needs Work.
Thanks,
Harish
Comment #4
silvi.addweb commentedHi @harish,
Thanks for your reply. This is working fine for me. Can you please check console error and tell me please which jquery version you used.
Comment #5
harish b commentedHi Tejal,
I am getting error that (jQuery(...).live is not a function). I got related issue on stackoverflow follows below::
jQuery .live() has been removed in version 1.9 onwards.
That means if you are upgrading from version 1.8 and earlier, you will notice things breaking if you do not follow the migration guide below. You must not simply replace .live() with .on()!
Read before you start doing a search and replace:
For quick/hot fixes on a live site, do not just replace the keyword live with on,
as the parameters are different!
.live(events, function)
should map to:
.on(eventType, selector, function)
The selector is very important! If you do not need to use this for any reason, set it to null.
Migration Example 1:
before:
$('#mainmenu a').live('click', function)
after, you move the child element (a) to the .on() selector:
$('#mainmenu').on('click', 'a', function)
Comment #6
nitin.k commentedThanks everyone for being here, looks like our module is gaining popularity.
#5: The JQuery version for click event is fixed up. So it will work for all versions of JQuery. Download the latest code.
Meanwhile I am looking autocomplete things.
Comment #7
silvi.addweb commented@harish,
The patch I previously provided uses correct syntax for
on(). The problem is something else.The module code has changed yesterday and now it includes check for jquery version. Refer to commit here.
In this commit,
parseFloat()is used but it returns 1.1 in case you are using 1.10.2 for example, that breaks the functionality.Attached patch solves this issue.
Comment #9
nitin.k commented#7: Click event has been handled separately. We should not get this anymore. Please check latest dev code.
Comment #10
silvi.addweb commentedLatest dev version is working fine. It looks like click event is completely rewritten in dev version. Therefore this patch is not required anymore.
Comment #11
nitin.k commented