简体   繁体   中英

clicking on a link behaviour inconsistent

I am experiencing a bug that only occurs on some computers on my company.

I'd like to ask my support but they will ask me if I can replicate the bug and I cannot.

Basically, you can see in this picture the web display of a roblematic part : it's a simple checkbox to filter data that appears in a graph : http://imgur.com/s9MvGun

Clicking on the "Clear" link exhibits different behaviour depending on my computer :

  • On "regular" computers, it will do what it's supposed to do and clear the checked boxes

  • On the "problematic" computers, clicking the link opens another window.

The only difference I could find between a "regular" and a "problematic" was in the "Inspect" mode of the link where I see :

<a href="#" class="clearVisible" data-ytta-id="-" id="yui_3_14_1_1_146******2464_32520">Clear</a>

It seems that on one of my computer, the above link is interpreted as a regular HTML link so it just opens currenturl#.

I am guessing (I am not a pro of webdevelopment) that this is a javascript or php call that is poorly interpreted by my "problematic" computers as an HTML link (to be opened in a new window for weird reasons)

I tried to check if I had Javascript disabled on the problematic computers, but no. I also tried it on eight different computers and about half of them exhibit the problematic behaviour but :

  • only in Chrome

  • only in non-anonymous mode (This seems like an important clue)

I would like to know what could cause this kind of issue, and which steps I can take on my side to discover what is happening to me and being able to create a real support ticket.

Edit : the version of Chrome where it occured was the 50.0.2661.94 m (it was also the version installed on some browsers)

The URL that is opened is the one that the HTML links points to, ie

http://example.com/dashboard.html#

While the original URL was

http://example.com/dashboard.html#project=/gdc/projects/xxx&dashboard=/gdc/md/xxx/obj/2706&tab=xxx

Cause of the problem : After investigation, the problem was indeed coming from an extension : "Emoji Input by Emoji Stuff" version 3.0 + Google chrome 50.0.2661.94 m + poorly implemented javascript action = this bug

Props to Davide Melfi for having smelled the origin of the issue with my imprecise initial description.

I'm guessing a lot because there's no code. Let's break down the possible causes:

javascript

  • event.preventDefault not implemented on click action, but in this case you should see the page bumping at the top of the page and not opening a new box.

  • window.open on click action, in this case could be useful to know the url of the opened page.

Browser problems

  • Some plugins installed in your browser could mess up with links or js on the page you should disable every plugin of the problematic browsers and verify the problem. This could explain the different behavior in anonymous mode. I think that this could be the real problem.

  • Buggy browser version. But I don't think that the problem could be that. Try to update all the problematic browsers.

As a side note, if the clear all does not use the href attributes and performs only a javascript action should be implemented as a button and not as a link.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM