I have a CTI integration that will display a HTML5 notification if a call comes in and the browser tab is not visible.

When this notification is clicked I want the tab to focus. Normally this can be done quite easily in JavaScript using window.focus()

However since the softphone is in an iFrame this doesn't seem to work. Is is possible to get access to the main window object to call the focus function?


Running in an iFrame you can't get at the parent.

Open CTI has a focus method but that is only for Intra-browser focus.

I'm not aware of any way to force a browser to take focus when you're running in an iFrame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.