wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

HyperlinkButton TargetName _Blank not working in IE11 #206

Closed deepaksm1 closed 8 years ago

deepaksm1 commented 8 years ago

HyperlinkButton TargetName = _Blank not working in IE11 Version 11.0.9600. Page should open in new window if target is _Blank.

<HyperlinkButton Content="Download" Foreground="Teal" NavigateUri="{Binding Path=FileId, Converter={StaticResource DocumentLinkConverter}}" TargetName="_Blank" />
deepaksm1 commented 8 years ago

It works if I change launchDummyLink function in fayde.js as below:

function launchDummyLink(target, navigateUri) {
            dummyLink = dummyLink || document.createElement('a');
            dummyLink.style.position = "absolute";
            dummyLink.style.left = "-100px";
            dummyLink.style.top = "-100px";
            dummyLink.href = navigateUri;
            dummyLink.target = target;
            document.body.appendChild(dummyLink);
            dummyLink.click();
            document.body.removeChild(dummyLink);
       }
deepaksm1 commented 8 years ago

Fayde version: 0.19.7

BSick7 commented 8 years ago

Just tested in IE 11, Edge, and Chrome. All working as intended.

BSick7 commented 8 years ago
<HyperlinkButton Content="Download" Foreground="Teal" NavigateUri="/Home" TargetName="_Blank" />

Before clicking: image

After clicking: image