浏览代码

AMBARI-10619. Clicking on text area of combo should drop down entries (Richard Zang via srimanth)

Srimanth Gunturi 10 年之前
父节点
当前提交
54c5fbe17b
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js

+ 10 - 0
ambari-web/app/views/common/configs/widgets/combo_config_widget_view.js

@@ -113,6 +113,16 @@ App.ComboConfigWidgetView = App.ConfigWidgetView.extend({
   restoreValue: function() {
     this._super();
     this.setConfigValue({ context: this.get('config.defaultValue') });
+  },
+
+  /**
+   * Delegate event from text input in combo widget to trigger dropdown
+   */
+  click: function(event) {
+    if (event.target.className.contains('ember-text-field')) {
+      $(event.target).closest('.dropdown').toggleClass('open');
+      return false;
+    }
   }
 
 });