Added support for adding palette to other elements than input, and added disable state for inactivate the popup