diff --git a/package.json b/package.json index f40e4224..f85ddf0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fuse2", - "version": "1.3.2", + "version": "1.3.3", "license": "https://themeforest.net/licenses/terms/regular", "scripts": { "ng": "ng", @@ -19,19 +19,19 @@ "private": true, "dependencies": { "@agm/core": "1.0.0-beta.2", - "@angular/animations": "5.1.3", - "@angular/cdk": "5.0.3", - "@angular/common": "5.1.3", - "@angular/compiler": "5.1.3", - "@angular/core": "5.1.3", + "@angular/animations": "5.2.0", + "@angular/cdk": "5.0.4", + "@angular/common": "5.2.0", + "@angular/compiler": "5.2.0", + "@angular/core": "5.2.0", "@angular/flex-layout": "2.0.0-beta.12", - "@angular/forms": "5.1.3", - "@angular/http": "5.1.3", - "@angular/material": "5.0.3", - "@angular/material-moment-adapter": "5.0.3", - "@angular/platform-browser": "5.1.3", - "@angular/platform-browser-dynamic": "5.1.3", - "@angular/router": "5.1.3", + "@angular/forms": "5.2.0", + "@angular/http": "5.2.0", + "@angular/material": "5.0.4", + "@angular/material-moment-adapter": "5.0.4", + "@angular/platform-browser": "5.2.0", + "@angular/platform-browser-dynamic": "5.2.0", + "@angular/router": "5.2.0", "@ngrx/effects": "4.1.1", "@ngrx/router-store": "4.1.1", "@ngrx/store": "4.1.1", @@ -41,7 +41,7 @@ "@swimlane/ngx-datatable": "11.1.7", "@swimlane/ngx-dnd": "3.1.0", "@types/prismjs": "1.9.0", - "angular-calendar": "0.23.1", + "angular-calendar": "0.23.2", "angular-in-memory-web-api": "0.5.2", "classlist.js": "1.1.20150312", "core-js": "2.5.3", @@ -51,17 +51,17 @@ "moment": "2.20.1", "ngrx-store-freeze": "0.2.0", "ngx-color-picker": "5.3.0", - "ngx-cookie-service": "1.0.9", + "ngx-cookie-service": "1.0.10", "perfect-scrollbar": "1.3.0", "prismjs": "1.9.0", "rxjs": "5.5.6", "web-animations-js": "2.3.1", - "zone.js": "0.8.19" + "zone.js": "0.8.20" }, "devDependencies": { "@angular/cli": "1.6.3", - "@angular/compiler-cli": "5.1.3", - "@angular/language-service": "5.1.3", + "@angular/compiler-cli": "5.2.0", + "@angular/language-service": "5.2.0", "@angularclass/hmr": "2.1.3", "@types/jasmine": "2.5.54", "@types/jasminewd2": "2.0.3", diff --git a/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts b/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts index 6d3eed11..9156f2c3 100644 --- a/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts +++ b/src/app/core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts @@ -1,8 +1,8 @@ -import { AfterViewInit, Directive, ElementRef, OnDestroy, OnInit } from '@angular/core'; -import PerfectScrollbar from 'perfect-scrollbar'; +import { AfterViewInit, Directive, ElementRef, HostListener, OnDestroy } from '@angular/core'; import { FuseConfigService } from '../../services/config.service'; import { Subscription } from 'rxjs/Subscription'; import { Platform } from '@angular/cdk/platform'; +import PerfectScrollbar from 'perfect-scrollbar'; @Directive({ selector: '[fusePerfectScrollbar]' @@ -13,7 +13,7 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy isDisableCustomScrollbars = false; isMobile = false; isInitialized = true; - ps; + ps: PerfectScrollbar; constructor( public element: ElementRef, @@ -62,6 +62,21 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy this.ps.destroy(); } + @HostListener('document:click', ['$event']) + documentClick(event: Event): void + { + if ( !this.isInitialized || !this.ps ) + { + return; + } + + // Update the scrollbar on document click.. + // This isn't the most elegant solution but there is no other way + // of knowing when the contents of the scrollable container changes. + // Therefore, we update scrollbars on every document click. + this.ps.update(); + } + update() { if ( !this.isInitialized )