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

修正IE9,因为安全问题无法选择文本域的文本的bug #68

Open
minghe opened this issue Apr 4, 2013 · 0 comments
Open
Labels

Comments

@minghe
Copy link
Contributor

minghe commented Apr 4, 2013

加行input.blur();

           var input = uploader.get('target').all('input').getDOMNode();
            input.select();
            //确保IE9下,不会出现因为安全问题导致无法访问
            input.blur();
            var src = document.selection.createRange().text;
            var img = $('<img style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);width:300px;visibility:hidden;"  />').appendTo('body').getDOMNode();
            img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
            var width = img.offsetWidth;
            var height = img.offsetHeight;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant