Using modules that add the attribute "disabled=disabled" at Text-input the Arrow-button should be disabled too. Instead of this, it pop-ups the List and when you select an item from list Text-input is being updated.

So... editing the autocomplete_deluxe.js

I replaced

    parent.mousedown(function() {
      if (parent.hasClass('autocomplete-deluxe-single-open')) { 
        jqObject.autocomplete('close');
      } else {
        jqObject.autocomplete('search', '');
      }
    });

With

    parent.mousedown(function() {
      if (parent.hasClass('autocomplete-deluxe-single-open')) { 
        jqObject.autocomplete('close');
      } else if (parent.children('input.autocomplete-deluxe-form').attr('disabled') == false) {
        jqObject.autocomplete('search', '');
      }
    });
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sepgil’s picture

FileSize
686 bytes

Your hack only works for single value widgets, but we should ensure that it works for all type of widgets.
This patch should work, but we should also somehow visualize that the widget is disabled, before I commit anything.

mojiro’s picture

FileSize
5.09 KB

I will suggest a simple grey color for widget background.
The same does the simple reference widget.

sepgil’s picture

How do like this style?

sepgil’s picture

Status: Active » Needs review
mojiro’s picture

Seems very nice, I will apply the patch to ensure that.

sepgil’s picture

Has anyone tried this out? If yes, please post your results so I can commit the patch.