mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
parent
3d6253f90c
commit
a834c20661
1 changed files with 6 additions and 3 deletions
|
@ -546,13 +546,16 @@ export class QueryStringInputUI extends Component<Props, State> {
|
||||||
this.updateSuggestions.cancel();
|
this.updateSuggestions.cancel();
|
||||||
this.componentIsUnmounting = true;
|
this.componentIsUnmounting = true;
|
||||||
window.removeEventListener('resize', this.handleAutoHeight);
|
window.removeEventListener('resize', this.handleAutoHeight);
|
||||||
window.removeEventListener('scroll', this.handleListUpdate);
|
window.removeEventListener('scroll', this.handleListUpdate, { capture: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
handleListUpdate = () =>
|
handleListUpdate = () => {
|
||||||
this.setState({
|
if (this.componentIsUnmounting) return;
|
||||||
|
|
||||||
|
return this.setState({
|
||||||
queryBarRect: this.queryBarInputDivRefInstance.current?.getBoundingClientRect(),
|
queryBarRect: this.queryBarInputDivRefInstance.current?.getBoundingClientRect(),
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
handleAutoHeight = () => {
|
handleAutoHeight = () => {
|
||||||
if (this.inputRef !== null && document.activeElement === this.inputRef) {
|
if (this.inputRef !== null && document.activeElement === this.inputRef) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue