When working on #1822222: Problem with Displaying Filter Tips and Auto Submit we ran into an issue where select elements were being auto-submitted by ctools even when they had the ctools-auto-submit-exclude patch.

It looks like the ctools auto submit code only checks for the exclusion class on "input" elements, and not select elements.

#1 1822472-exclude-all.patch834 bytesbeeradb
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]


beeradb’s picture

Version:7.x-1.2» 7.x-1.x-dev
Status:Active» Needs review
new834 bytes
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]

This patch fixes the issue, but could likely be improved. I attempted to add the exclusion to the .filter line (i.e. select:not(.ctools-auto-submit-exclude)) as well as refactoring all of the exclusions to an additional .filter line. The only way I was able to reliably exclude them was via the check on the e.target line.

It does feel sub-optimal to bind the event only to check for the class once the change event fires, so if there are suggestions for improvements I'm happy to re-roll with them included.

populist’s picture

I reviewed the patch in #1 and I think the approach is fine given the original functionality (i.e. ability to exclude fields from the auto-submit) doesn't seem to work with the original implementation and this is only a minor change to make it compatibility. That being said, given the self doubt in #1 not going to mark RTBC and would be helpful to have someone else weigh in.

merlinofchaos’s picture

Status:Needs review» Fixed

Committed and pushed.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.