Iframe-resizer: iframeResize.moveToAnchor() not working (@3.5.4)

Created on 13 Jun 2016  路  5Comments  路  Source: davidjbradshaw/iframe-resizer

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.

bug

All 5 comments

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

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

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

Waiting for the release :)

v3.5.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

todesignandconquer picture todesignandconquer  路  9Comments

wei2go picture wei2go  路  3Comments

lukashanssondn picture lukashanssondn  路  7Comments

TarsisDragomir picture TarsisDragomir  路  5Comments

anlambert picture anlambert  路  6Comments