So I'm in the situation where I have a Lightning component that's embedded in LEX, and it provides links that open up a new window containing a Visualforce page. Each link opens the same page but passes a different ID parameter.
window.open method to achieve this, and it does work. The first click on a link opens the Visualforce page in a new window and shows the correct record.
Clicking another link in the Lightning component correctly updates the URL in the popup window, and that displays what it should, but then LEX displays an error about cross-origin access:
Is there a way to just bury this error?
Things I've Tried
- Using regular link tags instead of a controller/helper method - same result
- Storing the
window.openin an attribute and then using it later - this gives the cross domain issue when trying to retrieve it from the component so can't use it
Crappy Workaround Currently In Play
Instead of storing a reference to the
windowObjectReference I've established that I can store a reference to it's
close() function instead, and then call that on the second click prior to opening another window. It does work, but it means a big flash of white in the popup window.