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

make the rangy.shim(iframeWin) works #340

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shuizhongyueming
Copy link

I want to use rangy.shim for a iframe window to make At.js work fine under IE6 with a contentEditable iframe.

with code like below

rangy.shim(ifr.contentWindow);

but when I make a Breakpoints at the code below

api.addShimListener(function(win) {
    if (typeof win.getSelection == "undefined") {
        win.getSelection = function() {
            return getSelection(win);   // at here the win is null
        };
    }
    win = null;   // set the win to null will make the returned getSelection can't get the real win
});

so I delete the win = null;

and also the doc.createRange

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

Successfully merging this pull request may close these issues.

1 participant