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

在IE8,9的情况下,将插件放在一个fixed或者absolute的弹窗内部时,无法触发插件 #14

Open
yaowangmx opened this issue Mar 6, 2018 · 1 comment

Comments

@yaowangmx
Copy link

yaowangmx commented Mar 6, 2018

在IE8,9的情况下,将插件放在一个fixed或者absolute的弹窗内部时,无法触发插件,但是如果将position改为static之后,又可以实现,请问如何解决呢?附demo:链接:https://pan.baidu.com/s/1XzjFOHVFP1t0XnVWQyb51A 密码:pyfg

@devin87
Copy link
Owner

devin87 commented Mar 7, 2018

将容器(container)设为 fixed或者absolute 元素,然后计算上传按钮距容器的位置(指定 getPos 方法)

var uploader = new Q.Uploader({
    url: UPLOAD_URL + "?type=file",
    target: document.getElementById("upload-target"),
    view: document.getElementById("upload-view"),

    container: document.getElementById("main"),
    getPos: function (target) {
        return { left: target.offsetLeft, top: target.offsetTop };
    },

    //clickTrigger: false,

    on: {}
});

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

2 participants