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

iframeResize.moveToAnchor() not working (@3.5.4) #374

Closed
sebaplaza opened this issue Jun 13, 2016 · 5 comments
Closed

iframeResize.moveToAnchor() not working (@3.5.4) #374

sebaplaza opened this issue Jun 13, 2016 · 5 comments
Labels

Comments

@sebaplaza
Copy link

sebaplaza commented Jun 13, 2016

When moveToAnchor() is called from the parent, the iframe is not processing the message.

This method send a messageType :

inPageLink

Then in iframeResizer.contentWindow.js there is no an event for inPageLink ... so... nothing happen.

    function callFromParent(){
            switch (getMessageType()){
            case 'reset':
                resetFromParent();
                break;
            case 'resize':
                resizeFromParent();
                break;
            case 'moveToAnchor':
                moveToAnchor();
                break;
            case 'message':
                messageFromParent();
                break;
            case 'pageInfo':
                pageInfoFromParent();
                break;
            default:
                if (!isMiddleTier() && !isInitMsg()){
                    warn('Unexpected message ('+event.data+')');
                }
            }
        }

If i call moveToAnchor() in :

            case 'moveToAnchor':
                moveToAnchor();

everything works as expected.

@davidjbradshaw
Copy link
Owner

Hmm, looks like you might be the first person ever to use that :) Yep that's a bug.

@davidjbradshaw
Copy link
Owner

Can you try the dev branch version and let me know if that fixes things for you, before I make a formal release.

@sebaplaza
Copy link
Author

I confirm, it's working after your commit.
Thanks !

@sebaplaza
Copy link
Author

sebaplaza commented Jun 14, 2016

Waiting for the release :)

@davidjbradshaw
Copy link
Owner

v3.5.5

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

2 participants