Skip to content

Commit e74fe37

Browse files
authored
Merge branch 'master' into astaev/issue7569-master
2 parents 109d795 + 4966d67 commit e74fe37

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"web-animations-js": "^2.3.2"
8383
},
8484
"igxDevDependencies": {
85-
"@igniteui/angular-schematics": "~10.1.610-beta.0"
85+
"@igniteui/angular-schematics": "~10.1.610"
8686
},
8787
"ng-update": {
8888
"migrations": "./migrations/migration-collection.json"

projects/igniteui-angular/src/lib/core/setImmediate.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
*/
2121

2222
// Note: Originally copied from core-js-pure package and modified. (https://github.com/zloirock/core-js)
23-
const windowLocation = window.location;
24-
let counter = 0;
23+
2524
const queue = {};
25+
let counter = 0;
26+
let eventListenerAdded = false;
2627

2728
const run = function (id) {
2829
if (queue.hasOwnProperty(id)) {
@@ -36,15 +37,16 @@ const listener = function (event) {
3637
run(event.data);
3738
};
3839

39-
if (!window.setImmediate) {
40-
window.addEventListener('message', listener, false);
41-
}
42-
4340
export function setImmediate(cb: any) {
4441
if (window.setImmediate) {
4542
return window.setImmediate(cb);
4643
}
4744

45+
if (!eventListenerAdded) {
46+
eventListenerAdded = true;
47+
window.addEventListener('message', listener, false);
48+
}
49+
4850
const args = [];
4951
let i = 1;
5052

@@ -56,6 +58,7 @@ export function setImmediate(cb: any) {
5658
(typeof cb === 'function' ? cb : Function(cb)).apply(undefined, args);
5759
};
5860

61+
const windowLocation = window.location;
5962
window.postMessage(counter + '', windowLocation.protocol + '//' + windowLocation.host);
6063

6164
return counter;

projects/igniteui-angular/src/lib/navigation-drawer/navigation-drawer.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ export class IgxNavigationDrawerComponent implements
495495
this.setDrawerWidth(changes.width.currentValue);
496496
}
497497

498+
if (changes.isOpen) {
499+
this.setDrawerWidth(this.isOpen ? this.width : (this.miniTemplate ? this.miniWidth : ''));
500+
}
501+
498502
if (changes.miniWidth) {
499503
if (!this.isOpen) {
500504
this.setDrawerWidth(changes.miniWidth.currentValue);

0 commit comments

Comments
 (0)