Skip to content

Commit

Permalink
add parent check - #82
Browse files Browse the repository at this point in the history
  • Loading branch information
icedman committed Jun 15, 2024
1 parent 6ca39bb commit a135fea
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,23 +485,6 @@ export default class SearchLightExt extends Extension {
return result;
}

_disableDrag() {
// cancel all drag
try {
let grid = this._searchResults._content.first_child.first_child.child.child;
if (grid.style_class == 'grid-search-results') {
grid.get_children().forEach((c) => {
if (c._draggable) {
c._draggable.startDrag = () => {}
c._draggable._maybeStartDrag = () => {}
}
});
}
} catch(err) {
console.log(err);
}
}

_layout() {
this._queryDisplay();
if (!this.monitor) return;
Expand Down Expand Up @@ -709,15 +692,19 @@ export default class SearchLightExt extends Extension {

_release_ui() {
if (this._entry) {
this._entry.get_parent().remove_child(this._entry);
if (this._entry.get_parent()) {
this._entry.get_parent().remove_child(this._entry);
}
this._entryParent.add_child(this._entry);
this._entry = null;
}

if (this._search) {
this._removeProviders();
this._search.hide();
this._search.get_parent().remove_child(this._search);
if (this._search.get_parent()) {
this._search.get_parent().remove_child(this._search);
}
this._searchParent.add_child(this._search);
if (this._textChangedEventId) {
this._search._text.disconnect(this._textChangedEventId);
Expand Down

0 comments on commit a135fea

Please sign in to comment.