I'm having trouble with the module, when using with AJAX enabled.
The request to load the feedback form works fine, but all the behaviors on the page are invoked when the AJAX returns and the context is equal to the document. Normally, the context should be the element that is going to be replaced by the result of the AJAX call.
How could I specify the context correctly for these AJAX requests?
Any help is much appreciated!
Comments
Comment #2
reszliIt seems to be caused by the following line in feedback-collect.js:
I would replace it by something like, to prevent another attach with document as context (it left empty it uses document):
it should not break the 3 attach function of the module itself, since the context is not used in any of them:
Comment #3
jelenakrmar commentedHi, thanks for pointing out to the problem and suggesting a possible solution. I'll look into it and try to make improvements in the next couple of days. Can you please give me more detail about the specific problem and how to recreate it? Because I am using this module in a project with a lot of AJAX and Javascript and haven't noticed any problems.
Thanks,
Jelena
Comment #4
monstrfolk commented@reszli....did you test your suggestion? Does it work? I am also having a problem with the Javascript. Modal window div is not removed from the HTML document on small width devices. Modal div is attached to the root document.
See... https://www.drupal.org/node/2845654
Comment #6
ntucakovic commentedThank you for waiting this long for the patch. If you could test it out now @reszli ?
Should be fixed by narrowing down where to re-attach behaviors.
Comment #7
monstrfolk commentedwhich branch has this commit?
Comment #8
jelenakrmar commented7.x-1.x
Comment #9
monstrfolk commentedA new release needs to be created with this fix.
Comment #10
jelenakrmar commenteddone :)
7.x-1.4
Comment #11
ntucakovic commentedAs mentioned, fix is included in latest 7.x-1.4 release.
Comment #12
monstrfolk commentedi found it...thanks.