Преглед изворни кода

HUE-6330 [autocomplete] Prevent propagation of the scroll event in the autocomplete dropdown

Johan Ahlen пре 8 година
родитељ
комит
11fb867637

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 1 - 1
desktop/core/src/desktop/static/desktop/less/hue-autocomplete.less

@@ -21,7 +21,7 @@
 .hue-ace-autocompleter {
   position: fixed;
   .display-flex();
-  z-index: 1000;
+  z-index: 999;
   max-height: 250px;
   align-items: flex-start;
 }

+ 2 - 2
desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

@@ -22,7 +22,7 @@ from desktop.views import _ko
 <%def name="hueAceAutocompleter()">
   <script type="text/html" id="hue-ace-autocompleter">
     <!-- ko if: active() && suggestions.filtered().length !== 0 -->
-    <div class="hue-ace-autocompleter" data-bind="style: { top: top() + 'px', left: left() + 'px' }">
+    <div class="hue-ace-autocompleter" data-bind="style: { top: top() + 'px', left: left() + 'px' }, event: { mousewheel: function (data, event) { event.stopPropagation(); }}">
       <div class="autocompleter-suggestions">
         <!-- ko if: suggestions.availableCategories().length > 1 || suggestions.loading() -->
         <div class="autocompleter-header">
@@ -34,7 +34,7 @@ from desktop.views import _ko
           <div class="autocompleter-spinner"><!-- ko hueSpinner: { spin: suggestions.loading, size: 'small' } --><!-- /ko --></div>
         </div>
         <!-- /ko -->
-        <div class="autocompleter-entries" data-bind="foreach: suggestions.filtered">
+        <div class="autocompleter-entries" data-bind="foreach: suggestions.filtered, niceScroll">
           <div class="autocompleter-suggestion" data-bind="click: function () { $parent.selectedIndex($index()); $parent.insertSuggestion(); $parent.editor().focus(); },
               css: { 'selected': $index() === $parent.selectedIndex() },
               event: { 'mouseover': function () { $parent.hoveredIndex($index()); }, 'mouseout': function () { $parent.hoveredIndex(null); } }">

Неке датотеке нису приказане због велике количине промена