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

Commit

Permalink
修复当元素初始化时在页面不可见时,元素高度和宽度出错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
fforever14 authored Apr 2, 2018
1 parent 94ccdbd commit 99900d5
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 99900d5

Please sign in to comment.