last day (15 days later) » 

8:11 AM
0
Q: Android Mozilla FireFox not opening page in a new tab

maverickWe have a link that we get from server (Url) and we want to open it in new window. We are using following code to do that: <a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" href='/m@(Url)'> This is working fine but is not opening new window in mozilla fir...

 
I don't see issue on my test. If href value is coming from server code, please post whole HTML tag.
 
i am testing on mozilla firefox v 56.0, device android,
 
Please post whole a tag after server rendering. The href value might have some invalid characters.
 
<a class="listingTxt block text-default no-direct" id="listingTxt" title="Honda City 1.5 S MT" profileid="D1405814" target="_blank" href="/m/used/cars-in-mumbai/honda-city-2011-2014-d1405814/"‌​>TestLink</a>
 
Link is ok. Go to about:config in FireFox browser and turn on the required setting that you found best match
 
8:11 AM
Not working. It's already 0.
I have found same issue on some website
would you link to check that link?
 
8:43 AM
Please explain here now
 
do you have android device and firefox browser?
 
No, I don't.
 
Ok. I will try to explain
I found similar issue on some website
can you open this link?
 
yes, opened
 
do you see "Show Similar Cars >>" button?
sorry, link
can you open that?
 
8:47 AM
yes and it is working on Desktop browser
 
yes..
did you see Similar Cars?
pop up?
 
Not popup with link opens in new tab.
 
are you on this screen?
 
yes that is right.
 
If you open any of the cars here, they are not getting opened in new tab
 
8:51 AM
Clicking on any car link opens in new page. But it works in Desktop Browser
 
only in mozilla browser
 
Yes I understand you are talking about Mozilla Browser for Android.
 
yes, it works in desktop all browser, even in firefox
 
Is that not opening at all or not open in new tab?
ok...
 
it opens and shows blank new tab
about:blank
 
8:52 AM
I see.
Are you using any library like Angular for you app?
 
do you see any reason?
No library..just plain javascript and jquery
 
It looks like you are updating 'href' by using JavaScript, right?
one moment...
 
No, in my code I have:

<a class="block img-holder usedsearch-img-holder position-rel" target="_blank" href='/m@(Url)'>
Just put the URL coming from server in href attribute
If i use onclick, it gets opened in new window
but i don't want to do that
 
Never mind
Go to this URL and click on link: s.codepen.io/boomerang/…
Here is the short url of same: tinyurl.com/AndFF123
Open the link in your Android FF browser and check if it open in new tab
 
open in same tab
this is getting opened in same tab
 
9:07 AM
I guess you javascript is not setting HREF value due to which it open with no URL. But other issue still remains of not opening in new tab.
I am install browser to test it
 
great
in android phone?
One more interesting thing I found here:-
If i am opening cars at this website, they are getting opened in new window
and i see href implementation to be very similar
 
9:22 AM
??
Any clue?
 
I installed browser and found the issue.
give me 15 mins...
 
sure
please take your time
 
I found that you are building link (HREF attribute value) using JavaScript. Is that right?
To prove this you can set link to "http://www.google.com" and check if issue persists.
 
No luck
I replaced <a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" href='http://www.google.com'>
This gets opened in all except android mozilla
did you try the same in android mozilla, is it working for you?
And following works at all places:
<a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" onclick="window.open('http://www.google.com', '_blank');">
Any clue?
 
9:46 AM
I check and found still old link
 
what did you check?
where did you find old link?
 
on Similar Cars. Maruti Suzuki SX4 ZX
 
I am not updating it anywhere..
I am just trying on my local maching
*machine
 
I just tested with google link and it worked.
Can you share you screen using TeamViewer?
*your
 
sorry, i don't have permissions to do that
did you try this <a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" href='http://www.google.com'>?
 
9:56 AM
Use HTML from here: codepen.io/AmitKB/pen/OOpdXp
that one is working fine on my FF browser. You also open that link on your Android FF browesr and check
 
i will
give me a minute
Not working
<a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" href='http://www.google.com'>TestLink href</a>
<a class="block img-holder usedsearch-img-holder position-rel no-direct" onclick="window.open('http://www.google.com', '_blank');">TestLink window open</a>
I added two links, first is not getting opened while 2nd gets opened smoothly
did you check?
Which version of mozilla and android you are using?
 
you forgot to prefix 'http://' , please try again : codepen.io/AmitKB/pen/OOpdXp
 
Not working
<a target="_blank" href='http://www.google.com'>TestLink href</a>
<br />
<a onclick="window.open('http://www.google.com', '_blank');">TestLink window open</a>

<br />
<a target="_blank" href='http://google.com'>TestLink href Amit</a>
Only "TestLink window open" is working
 
use 'http://google.com' not just 'google.com'
 
<a target="_blank" href='http://www.google.com'>TestLink href</a>
I am doing with http
but when i paste here, it's somehow gone
 
10:10 AM
My test working fine
 
which is android ver, mozilla ver/
?
 
Can you open my page codepen.io/AmitKB/pen/OOpdXp in your Android browser to test?
 
sure
You are correct
but this is super surprising
when I paste same link on my website, its not getting opened
 
Let me expalin you the cause of issue
 
although it works on codepen link
 
10:14 AM
You just paste your code at pastebin.com and share URL with me, I can take a look how your code really looks like. I am talking your localhost code you are testing with.
 
sure
Only 2nd works on my localhost "TestLink window open"
On codepen, all 4 links are working
 
Not sure about localhost. let's focus on real issue. Just try with some static link for similar cars page and it will work.
The javascript code that is generating link for anchor tag might have some issue on FF browser. So if static links works, you ned to check javascript.
 
Okay i will check that
 
10:30 AM
All the best (y)
 
I have hosted here
No luck
Could you test same on this page on your android device in mozilla?
??
are you connected?
While following link works perfectly fine:
https://staging.carwale.com:9006/WebForm1.aspx
 
Yes... issue.
 
are you able to replicate it?
 
Why don't you use both 'window.open' and 'href' both. That way HREF meets SEO and 'window.open' will be fallback for FireFox
 
that's the last alternate
but i wonder why this is the issue
 

last day (15 days later) »