Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for #939 🔨 #967

Merged
merged 5 commits into from
Feb 12, 2016
Merged

fix for #939 🔨 #967

merged 5 commits into from
Feb 12, 2016

Conversation

rishijain
Copy link
Contributor

Added a function setTargetSelf along the lines of setTargetBlank.

It is called whenever target is not suppose to be blank. The need to do this came up because of #939 . It worked well on all browsers except Firefox. So had to specifically remove target blank from the anchor tags. And one of the way I think to remove is to set it to _self.

@rishijain
Copy link
Contributor Author

Some tests are failing 😢 . So its a WIP right now.

expect(this.el.innerHTML.indexOf('<a href="http://test.com" target="_self">lorem ipsum</a>')).toBe(0);
} else {
expect(this.el.innerHTML.indexOf('<a target="_self" href="http://test.com">lorem ipsum</a>')).toBe(0);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seriously? 😞

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, firefox and chrome places target="_self" (or blank) at different positions. and thus need to add a check like this.

@nmielnik
Copy link
Member

👍

nmielnik added a commit that referenced this pull request Feb 12, 2016
@nmielnik nmielnik merged commit 5087f4b into master Feb 12, 2016
@j0k3r j0k3r deleted the fix939 branch February 12, 2016 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants