Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果上传按钮在初始化之前是隐藏的,会出现触发选择文件按钮的高度问题 #43

Open
lvshuang opened this issue Sep 16, 2014 · 0 comments

Comments

@lvshuang
Copy link

如果我的上传按钮最开始是隐藏的,outerHeight()只能得到按钮的border+padding的高度,在按钮展示以后,当鼠标移动到上传按钮,会执行一下代码:

// bind events
  Uploader.prototype.bind = function() {
    var self = this;
    var $trigger = $(self.settings.trigger);
    $trigger.mouseenter(function() {
      self.form.css({
        top: $trigger.offset().top,
        left: $trigger.offset().left,
        width: $trigger.outerWidth(),
        height: $trigger.outerHeight()
      });
    });
    self.bindInput();
  };

这里重新计算了form的高度,所以form高度不会出现问题,但是没有重新计算触发选择文件按钮的高度,导致按钮不容易点击到(高度太小),这个地方应该重新计算高度!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant