Strange Firefox Right-Click bug in Html5Mode

734 views
Skip to first unread message

Thomas Alton

unread,
May 5, 2013, 3:19:01 AM5/5/13
to ang...@googlegroups.com
Greetings!

Long time lurker, first time poster, blah blah.

I seem to have stumbled across an Angular bug where right-clicking a link will immediately navigate to the "href" destination. I believe I've narrowed it to the following pre-reqs:

I've set up a minimal proof of concept at http://angular.moatra.net (I would have used plunker, but it was being finnicky).   If you right-click on the "Other Link!" link, the location should be updated to http://angular.moatra.net/other.html

The easiest work-around is to update the bootstrap code from using  angular.bootstrap(document); to using angular.bootstrap(document.documentElement);

It took me a while to track down, so I thought I'd share with the community.  Thanks for the wonderful work!

-Thomas

fresh...@gmail.com

unread,
Jul 9, 2013, 1:50:26 AM7/9/13
to ang...@googlegroups.com
This bug was affecting my app, and the suggested workaround above was
100% effective in fixing it.

Thanks Thomas!
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+u...@googlegroups.com.
> To post to this group, send email to ang...@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
James

Eric Jain

unread,
Jul 31, 2013, 8:41:28 PM7/31/13
to ang...@googlegroups.com
Thanks for posting this! I noticed the same problem; the suggested workaround fixed it.

Dave Merrill

unread,
Aug 2, 2013, 11:38:44 AM8/2/13
to ang...@googlegroups.com
Is this compatible with all browsers that Angular is? If so, should it be in the docs, or even in the Angular code?

Dave Merrill

Thomas Alton

unread,
Aug 5, 2013, 1:53:38 AM8/5/13
to ang...@googlegroups.com
I've tested the workaround in IE8+, Android, Opera, Safari, Chrome, and Firefox.  All seem to be working fine.

document.documentElement is part of DOM Level 2 Core, which even IE6 should support.  Also, document.documentElement is what gets used for the bootstrap process if you apply the ng-app directive on the root <html></html> element (Like the docs for ng-app suggest).

-Thomas

Dave Merrill

unread,
Aug 5, 2013, 6:35:07 AM8/5/13
to ang...@googlegroups.com
My apologies, somehow my msg got posted to the wrong thread. (Though I suppose it's a valid question here too, and good that that's the answer :) )

Dave Merrill

Dave Merrill

unread,
Aug 5, 2013, 6:37:26 AM8/5/13
to ang...@googlegroups.com
Actually no, on further investigation my question went to the thread I intended (anuglar bootstrap release), but you appear to have responded in this one. Not trying to give you a hard time, just clarifying.

Dave Merrill

Tim Stewart

unread,
Jul 27, 2014, 10:11:31 PM7/27/14
to ang...@googlegroups.com
Immense thanks. This issue has just cost me a morning!

Thanks
Tim
Reply all
Reply to author
Forward
0 new messages