Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2792 from fforever14/master
Browse files Browse the repository at this point in the history
修复当元素初始化时在页面不可见时,元素高度和宽度出错的问题
  • Loading branch information
2betop authored Jan 31, 2019
2 parents 94ccdbd + 99900d5 commit 572f0a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ define([
refresh: function() {
var shimContainer = this.getRuntime().getContainer(),
button = this.options.button,
/*
width = button.outerWidth ?
button.outerWidth() : button.width(),
height = button.outerHeight ?
button.outerHeight() : button.height(),

*/
width = button[0].offsetWidth || button.outerWidth() || button.width(),
height = button[0].offsetHeight || button.outerHeight() || button.height(),
pos = button.offset();

width && height && shimContainer.css({
Expand Down

0 comments on commit 572f0a1

Please sign in to comment.