From 3df336fc88874fa5da6ce38cb74ee87fc9c6de83 Mon Sep 17 00:00:00 2001 From: smoti123 Date: Sat, 5 Jan 2019 14:19:53 +0100 Subject: [PATCH 1/7] use elvis operator --- src/components/Popup/OfficePopup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Popup/OfficePopup.vue b/src/components/Popup/OfficePopup.vue index 4aacd32..8b163de 100644 --- a/src/components/Popup/OfficePopup.vue +++ b/src/components/Popup/OfficePopup.vue @@ -67,7 +67,7 @@ private getScrollBar() { const root = this.$refs.self as HTMLElement; - if (root && root.style && root.style.overflowY) { + if (root?.style?.overflowY) { return; } let needsVerticalScrollBar = false; From d09e94ca49dbb2e8f3bf63daf967a0fe3f5298b5 Mon Sep 17 00:00:00 2001 From: smoti123 Date: Sat, 12 Jan 2019 21:36:16 +0100 Subject: [PATCH 2/7] add "OfficeModal" and Merge branch 'feature/component/popup' into feature/component/modal # Conflicts: # packages/documentation/Overview.vue # src/components/index.ts TODO: remove v-if must have for working OfficeModal and Popup --- packages/documentation/Overview.vue | 69 +++++++++++++------ .../components/Modal/OfficeModal.vue | 9 +-- .../components/Popup/OfficePopup.vue | 4 +- 3 files changed, 54 insertions(+), 28 deletions(-) rename packages/{ => office-ui-fabric-vue}/components/Popup/OfficePopup.vue (96%) diff --git a/packages/documentation/Overview.vue b/packages/documentation/Overview.vue index da127ce..bf2cec0 100644 --- a/packages/documentation/Overview.vue +++ b/packages/documentation/Overview.vue @@ -91,7 +91,8 @@ import {SpinnerSize} from "../office-ui-fabric-vue/components/Spinner/OfficeSpin I am content within the overlay. - Test + Test + I am content within the dark overlay. @@ -107,7 +108,8 @@ import {SpinnerSize} from "../office-ui-fabric-vue/components/Spinner/OfficeSpin Test Layer! - + @@ -136,6 +138,17 @@ import {SpinnerSize} from "../office-ui-fabric-vue/components/Spinner/OfficeSpin + + + + +
+

Sample Modal

+ +
+
+
+ This is the demo page for office-ui-fabric-vue @@ -143,30 +156,31 @@ import {SpinnerSize} from "../office-ui-fabric-vue/components/Spinner/OfficeSpin diff --git a/packages/office-ui-fabric-vue/components/Popup/OfficePopup.vue b/packages/office-ui-fabric-vue/components/Popup/OfficePopup.vue index 319da82..d711045 100644 --- a/packages/office-ui-fabric-vue/components/Popup/OfficePopup.vue +++ b/packages/office-ui-fabric-vue/components/Popup/OfficePopup.vue @@ -76,7 +76,7 @@ return; } let needsVerticalScrollBar = false; - if (root.firstElementChild) { + if (root && root.firstElementChild) { // ClientHeight returns the client height of an element rounded to an // integer. On some browsers at different zoom levels this rounding // can generate different results for the root container and child even From efda5b667b5dad5de108e3aa80f5dbfad2ee1b4d Mon Sep 17 00:00:00 2001 From: smoti123 Date: Sun, 13 Jan 2019 20:29:11 +0100 Subject: [PATCH 7/7] refactor --- .../components/Overlay/OfficeOverlay.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/office-ui-fabric-vue/components/Overlay/OfficeOverlay.vue b/packages/office-ui-fabric-vue/components/Overlay/OfficeOverlay.vue index c1a5d85..3e4e398 100644 --- a/packages/office-ui-fabric-vue/components/Overlay/OfficeOverlay.vue +++ b/packages/office-ui-fabric-vue/components/Overlay/OfficeOverlay.vue @@ -24,6 +24,10 @@ overflow: "hidden !important" as "hidden" }); + public destroyed() { + this.enableBodyScroll(); + } + public get classNames() { return mergeStyleSets(getStyles({ isDark: this.isDarkThemed, @@ -58,8 +62,7 @@ doc.body.removeEventListener("touchmove", this.disableIosBodyScroll); } } - public destroyed(){ - this.enableBodyScroll(); - } + + }