bug fix
This commit is contained in:
parent
295d566d5e
commit
a01d15412b
5
components/dist/input.js
vendored
5
components/dist/input.js
vendored
@ -521,9 +521,10 @@ customElements.define('sm-input',
|
||||
updatePosition = () => {
|
||||
requestAnimationFrame(() => {
|
||||
this.dimensions = this.getBoundingClientRect()
|
||||
this.scrollingParentDimensions = this.scrollingParent.getBoundingClientRect()
|
||||
if (this.dimensions.width === 0 || this.dimensions.height === 0) return;
|
||||
let topOffset = this.dimensions.top + this.dimensions.height;
|
||||
let leftOffset = this.dimensions.left;
|
||||
let topOffset = this.dimensions.top - this.scrollingParentDimensions.top + this.dimensions.height;
|
||||
let leftOffset = this.dimensions.left - this.scrollingParentDimensions.left;
|
||||
const maxWidth = this.dimensions.width
|
||||
this.feedbackPopover.style = `top: ${topOffset}px; left: ${leftOffset}px; max-width: ${maxWidth}px;`
|
||||
})
|
||||
|
||||
2
components/dist/input.min.js
vendored
2
components/dist/input.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user