Closed (fixed)
Project:
Entity Browser Enhance(d|r)
Version:
8.x-1.0-beta5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jul 2017 at 11:12 UTC
Updated:
5 Mar 2018 at 13:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rich.yumul commentedI've observed this behavior too.
Comment #3
rajab natshahThanks for reporting :)
Troubleshooting the wrong behaviour.
Comment #4
k3vin_nl commentedLooks like the javascript doesn't respect the context properly, causing the event handler to be attached multiple times.
I have added a patch that should fix this.
Comment #5
k3vin_nl commentedComment #6
k3vin_nl commented(Updated the patch to use the correct file structure.)
Comment #7
rajab natshahComment #8
rajab natshahComment #10
rajab natshahCommitted ... Thank you :)
Comment #11
rajab natshahComment #12
rajab natshahComment #13
k3vin_nl commentedHi, thanks for accepting my patch.
I just saw however that when I created my patch, I missed one line.
The context also needs to be added on line 71:
$('form.entity-browser-enhanced.multiselect .view .views-col', context).on('dblclick', function () {Comment #14
extect commentedThe patch committed in #9 is causing problems and makes image selection stop working as soon as I click on apply in exposed filters in the view (using inline entity form, entity browser and entity browser enhanced). Double-click is working, though. Removing the changes from #9 makes everything work again.
The changes suggested in #13 make even double-click stop working.
Comment #15
k3vin_nl commentedI saw that the patch indeed did not fix the issue completely, so I did some more debugging.
After an ajax refresh the 'context' that would get passed to the entityBrowserMultiselect function was the complete form. This caused the $('form.entity-browser-enhanced.multiselect .view .views-col', context) selector to not select anything after an ajax refresh.
I changed this for a smarter way of selecting the columns, so this patch should hopefully fix the issue.
Comment #16
k3vin_nl commentedComment #17
merilainen commentedTested the functionality and works nicely. Maybe the console debug messages should be removed from code?
Comment #18
k3vin_nl commentedAh, yes, the debug messages shouldn't have been in there. I'll update the patch!
Comment #19
k3vin_nl commentedComment #20
rajab natshahThank you Kevin,
Testing the issue
console.log should be removed from your patch as you remarked.
Comment #21
brtamas commentedHi All,
I still had some error with the working. I attach another patch, maybe it solves more case.
Comment #22
brtamas commentedHere is a better one
Comment #24
rajab natshahCommitted ... Thank you :)
Comment #25
rajab natshah