Skip to content

Commit

Permalink
fix: disable drag events
Browse files Browse the repository at this point in the history
  • Loading branch information
nvsukhanov committed Feb 1, 2024
1 parent 9689c11 commit 3c1add7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/features/root/src/lib/root.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, HostListener, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { CdkScrollable } from '@angular/cdk/overlay';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { NgIf } from '@angular/common';
Expand Down Expand Up @@ -50,6 +50,11 @@ export class RootComponent implements OnInit, OnDestroy, IScrollContainer {
return this._isSmallScreen;
}

@HostListener('dragstart', [ '$event' ])
public onDragStart(event: DragEvent): void {
event.preventDefault();
}

public ngOnInit(): void {
this.sub = this.screenSizeObserverService.isSmallScreen$.subscribe((isSmallScreen) => {
this._isSmallScreen = isSmallScreen;
Expand Down

0 comments on commit 3c1add7

Please sign in to comment.