ng-href link not followed on Firefox - ruby-on-rails

I'm using ng-href which seems to produce the correct results, and the correct behaviour on Chrome but not on Firefox.
on the page www.mydomian.com/clubs/ in my rails app i have the Haml
%a{'ng-href' => '\players\{{player.id}}'} {{player.name}}
when run this produces this html
<a ng-href="\players\14208" class="ng-binding" href="\players\14208">Dylan Robertson</a>
when I use Chrome and click on this link I'm taken to
www.mydomian.com/players/14208
however on firefox when I click on this same link I'm taken to
www.mydomian.com/clubs/%5Cplayers%5C14208
I can't work out why anyone any ideas?
I have
$rootElement.off('click') set in my app.run

Try changing your slashes to go the other way;
<a ng-href="/players/14208" class="ng-binding" href="/players/14208">Dylan Robertson</a>

Related

Hyperlink not clickable on Internet Explorer if use Url.Action

I used the mvc actionlink to get the url. It is working fine in chrome. But in IE it is not even clicking. i used the following code to navigate the page.
<a href="#Url.Action("GetHelpDocuments", "Document")">
<span class="navsprite helplink"></span>
<span>Help</span>
I don't find any error in my above code. But please give alternate solution for this.
I used localtion.href to get the actual location href
<a href="#Url.Action("GetHelpDocuments", "Document")" onclick='location.href = this.getAttribute("href")'>
<span class="navsprite helplink" ></span>
<span>Help</span>

How to prevent paper-dropdown-menu from changing hight of its list?

I have simple paper-dropdown-menu:
<paper-dropdown-menu label="select">
<paper-listbox class="dropdown-content">
<paper-item>option a</paper-item>
<paper-item>option b</paper-item>
</paper-listbox>
</paper-dropdown-menu>
When I click the dropdown for the first time everything is ok, but each next click cuts height of the list in half (in Dartium):
It works well when I compile this to javascript:
How to prevent this behaviour in Dartium?
This is a known issue in Dartium, it should work fine in other browsers. A new version of Dartium was announced for Dart 1.14.

Twitter share button not using custom url or text

I have a link like so
= link_to "https://twitter.com/share", class: "twitter-share-button", data: { url: "https://google.com", text: hack.body, via: "GhettoLifeHack_", hashtags: "ghettolifehack" } do
= image_tag "Tweet", alt: "Social Twitter tweet button"
and no matter how much I change the data-url value, the pre-tweet confirmation page always prepopulates the tweet form field with the url of the referring page, not the one I specified. It also ignores my custom data-text as well.
Why is this happening?
I also have this minified script
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
that I got from here https://about.twitter.com/resources/buttons#tweet
Removing that script doesn't seem to change anything.
edit: upon trying using :'data-url' attributes directly, the output html is the same.
I am testing hardcoded strings and dynamically generated urls at the same time. The first is the dynamic one.
<a class="twitter-share-button" href="https://twitter.com/share" data-via="GhettoLifeHack_" data-url="http://localhost:3000/hacks/1" data-text="asdf comment body" data-hashtags="ghettolifehack">
<img src="/images/Tweet" alt="Tweet" title=""></img>
</a>
The second is the hard coded strings
<a class="twitter-share-button" href="https://twitter.com/share" data-via="GhettoLifeHack_" data-url="httpL//google.com" data-text="custom text" data-hashtags="ghettolifehack">
<img src="/images/Tweet" alt="Tweet" title=""></img>
</a>
I've tested on development and in production. Both have the same behavior of pre-populating the tweet form with the referring url, rather than the specified url and text.
This works in Chrome for me but not in Firefox 32
The code provided by you is perfectly fine and should work as expected.
Many site issues can be caused by corrupt cookies or cache. Try to clear both cookies and the cache. I would suggest you to look into the following link to see why it is not working in firefox
The issue was specific to firefox browser. I'm not sure what addon or setting is causing the conflicts, but it is working perfectly find in chrome, including the popup window.

Twitter Follow button issue in different browsers

I am working on social plugins integration on my local site and i m trying to add twitter follow button onto it...but it is behaving differently in different browsers..Normally its works in the page...i have a slider inside which it is having this code...thats where it showing its case...i dont know why the follow button is rendering differently in different browsers...
the code i used to render the follow button,
<a href="https://twitter.com/Test" class="twitter-follow-button"
data-show-count="false" data-size="medium"></a>
and the script here,
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
Similar codes i tried,
<a href="https://twitter.com/Test" class="twitter-follow-button"
data-show-count="false" data-size="medium">Follow #Test</a>
And this one too,
<a href="https://twitter.com/Test" class="twitter-follow-button"
data-show-count="false" data-size="medium">Follow</a>
I have tested this code with the following browsers,
1.Firefox
2.Opera
3.Chrome
4.Safari
1&2 works properly but 3&4 it not working properly...
1&2 its shows Follow #Test
3&4 is showing only Follow
Whats the problem?Why the #Test is left out in 3&4 browsers....or does my code need some changes...or is it the browser problem...

target="_blank" in a facebook profile-tab application (iframe)

i need links in a profile-tab app i'm writing open in new browser tabs. i set target="_blank" (with both hardcoded and with FBJS), but when i click on the links, the app page just reloads. i had a look at the html of the app as it's rendered by FB, and each of my links has an onclik event on it, that after creating a new image, returns false.
i tried doing linkDomObjectHandle.purgeEventListeners('click'), but as i expected, that didn't do much.
does anyone know of a way to get this to work?
edit: tested, and "right-click -> open in new tab" and middle-click both do what is expected. just the left click event gets hijacked.
edit:
some code snippets:
i have a template that is cloned, filled and the clone is appended to an element. here is the html of the template:
<div id="hover_window">
<a href="">
<img src="">
<div class="article_info">
<div class="client_info"></div>
<div class="media_info"></div>
</div>
</a>
</div>
i fill the link by doing:
var hover_window = document.getElementById('hover_window').cloneNode(true);
hover_window.setClassName('active_hover_window');
hover_window.getFirstChild().setHref(targetLink.getHref());
i tried adding both target="_blank" to the html and .setTarget("_blank") to the FBJS, to no avail.
pls advise.
This works in my facebook profile tab-app
Link targetting _blank for me
Link test
Facebook edits this link and adds "target" depending on the href-url specified. If it is an internal facebook target, it targets the current frame, if it is and external url, it targets blank. Please just try the link above and see if it works for you (and remove all that javascript and stuff you have)

Resources