@vaadin/vaadin-dialog
Advanced tools
Comparing version 2.5.0-alpha5 to 2.5.0-beta1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-dialog", | ||
"version": "2.5.0-alpha5", | ||
"version": "2.5.0-beta1", | ||
"main": "vaadin-dialog.js", | ||
@@ -49,7 +49,8 @@ "author": "Vaadin Ltd", | ||
"@polymer/iron-test-helpers": "^3.0.0", | ||
"@vaadin/vaadin-button": "^2.4.0-alpha1", | ||
"@vaadin/vaadin-button": "^2.4.0-beta1", | ||
"@vaadin/vaadin-text-field": "~2.7.0-beta1", | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
"wct-browser-legacy": "^1.0.1", | ||
"@vaadin/vaadin-demo-helpers": "^3.1.0-alpha1" | ||
"@vaadin/vaadin-demo-helpers": "^3.1.0" | ||
} | ||
} |
@@ -24,3 +24,3 @@ const $_documentContainer = document.createElement('template'); | ||
[part='overlay'][style] .resizer-container { | ||
height: 100%; | ||
min-height: 100%; | ||
width: 100%; | ||
@@ -153,2 +153,3 @@ } | ||
e.preventDefault(); | ||
this._originalBounds = this._getOverlayBounds(); | ||
@@ -210,2 +211,3 @@ const event = this.__getMouseOrFirstTouchEvent(e); | ||
}); | ||
this.$.overlay.notifyResize(); | ||
@@ -232,2 +234,3 @@ } | ||
_getResizeDimensions() { | ||
const scrollPosition = this.$.overlay.$.resizerContainer.scrollTop; | ||
const {width, height} = getComputedStyle(this.$.overlay.$.overlay); | ||
@@ -238,4 +241,5 @@ const content = this.$.overlay.$.content; | ||
content.removeAttribute('style'); | ||
this.$.overlay.$.resizerContainer.scrollTop = scrollPosition; | ||
return {width, height, contentWidth, contentHeight}; | ||
} | ||
}; |
@@ -101,2 +101,3 @@ /** | ||
* Set to true to disable closing dialog on outside click | ||
* @attr {boolean} no-close-on-outside-click | ||
*/ | ||
@@ -107,2 +108,3 @@ noCloseOnOutsideClick: boolean; | ||
* Set to true to disable closing dialog on Escape press | ||
* @attr {boolean} no-close-on-esc | ||
*/ | ||
@@ -109,0 +111,0 @@ noCloseOnEsc: boolean; |
@@ -164,3 +164,3 @@ /** | ||
static get version() { | ||
return '2.5.0-alpha5'; | ||
return '2.5.0-beta1'; | ||
} | ||
@@ -182,2 +182,3 @@ | ||
* Set to true to disable closing dialog on outside click | ||
* @attr {boolean} no-close-on-outside-click | ||
* @type {boolean} | ||
@@ -192,2 +193,3 @@ */ | ||
* Set to true to disable closing dialog on Escape press | ||
* @attr {boolean} no-close-on-esc | ||
* @type {boolean} | ||
@@ -387,2 +389,3 @@ */ | ||
overlay.style.maxWidth = 'none'; | ||
this.__forceSafariReflow(); | ||
} | ||
@@ -438,2 +441,17 @@ | ||
} | ||
/** | ||
* Safari 13 renders overflowing elements incorrectly. | ||
* This forces it to recalculate height. | ||
* @private | ||
*/ | ||
__forceSafariReflow() { | ||
const scrollPosition = this.$.overlay.$.resizerContainer.scrollTop; | ||
const overlay = this.$.overlay.$.overlay; | ||
overlay.style.display = 'block'; | ||
window.requestAnimationFrame(() => { | ||
overlay.style.display = ''; | ||
this.$.overlay.$.resizerContainer.scrollTop = scrollPosition; | ||
}); | ||
} | ||
} | ||
@@ -440,0 +458,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51255
1003
7
1
20