vendredi 19 juin 2015

trouble with ctrl plus click of href=#

I am working with Ember JS. I have an <a> tag on click of which i submit a form from JS and navigate to the target url. Everything works fine.

For showing the pointer icon, i used href="#" on the HTML. As i have been doing for ages.

Now suddenly the QA decides to do right click and open in new tab or CTRL Click. Now what happens is, a new tab is opened with the URL like this.

http://ift.tt/1BnPpoF beacuse href was #.

And the QA expects to see the target page in the new tab

I have two fixes.

  1. Remove href = # and give CSS pointer style. So that new tab does not work
  2. Somehow open the tab and do the form post in the new tab.

Is 2 possible?




Aucun commentaire:

Enregistrer un commentaire