I found this by accident, as the regular CSS obfuscates the error – even empty popup wrappers get a close button element by the module script.

I turned off the module CSS file out of performance and simplicity reasons and now the popup close button is attached to the empty popup wrapper on every search box even though it's not used.

Would it be possible to either

  • check on block generation if the popup section is actually used before generating the wrapper?
  • test on close button injection, if the popup section actually has elements inside?

Thanks for considering!

Comments

Stolzenhain’s picture

Title: Popup region created when no elements are assigned » Popup region receives close button even when no elements are assigned
jdanthinne’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Status: Active » Needs review

Hi, I've just pushed changes to DEV version : http://drupalcode.org/project/custom_search.git/commit/dcff123
No markup should be generated if the popup is empty.
Please test and tell me if it's ok.

Stolzenhain’s picture

Status: Needs review » Closed (fixed)

Hello! The popup wrapper has vanished in the .dev version , so I'm marking this as fixed. Thanks!