File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2011-2025, The Trustees of Indiana University and Northwestern
3+ * University. Licensed under the Apache License, Version 2.0 (the "License");
4+ * you may not use this file except in compliance with the License.
5+ *
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software distributed
11+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+ * specific language governing permissions and limitations under the License.
14+ * --- END LICENSE_HEADER BLOCK ---
15+ */
16+
17+ import Autocomplete from '@github/auto-complete-element/dist/autocomplete.js'
18+
19+ Autocomplete . prototype . open = function ( event ) {
20+ const isHidden = this . results . popover ? ! this . results . matches ( ':popover-open' ) : this . results . hidden
21+ if ( isHidden ) {
22+ this . combobox . start ( )
23+ if ( this . results . popover ) {
24+ this . results . showPopover ( )
25+ } else {
26+ this . results . hidden = false
27+ }
28+ }
29+ this . container . open = true
30+ this . interactingWithList = false
31+ } ;
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ import Search from '../components/Search';
4040import MediaObjectRamp from '../components/MediaObjectRamp' ;
4141import ReactButtonContainer from '../components/ReactButtonContainer' ;
4242import PlaylistRamp from '../components/PlaylistRamp' ;
43- import '@github/auto-complete-element'
43+ import '../auto-complete-open.js' ;
44+ import '@github/auto-complete-element' ;
4445
4546ReactOnRails . register ( {
4647 CollectionList,
You can’t perform that action at this time.
0 commit comments