question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iframeResize.moveToAnchor() not working (@3.5.4)

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davidjbradshawcommented, Jun 16, 2016

v3.5.5

1reaction
sebaplazacommented, Jun 13, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

iframe-resizer - npm
This library enables the automatic resizing of the height and width of both same and cross domain iFrames to fit their contained content....
Read more >
iframe-resizer js library: moveToAnchor from parent page
Then the (re)sizing of the IFrame seems not to work perfectly and contents at the top of the iframe are getting cut off....
Read more >
iframeresize problem - JSFiddle - Code Playground
* Desc: Force iframes to size to content. 5. * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.
Read more >
2021年02月_weixin_39956451的博客_CSDN博客
原创 java keystoreapi_Load MSCAPI Java Keystore without loading private keys (hard token). The popup is being activated from the MS-CAPI Cryptographic ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found