Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(typeahead): don't close popup on right click
Browse files Browse the repository at this point in the history
- Ensure typeahead popup does not dismiss on right click in Firefox

Closes #3975
Fixes #3973
  • Loading branch information
wesleycho committed Jul 22, 2015
1 parent 8ae1a76 commit 7d1c460
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap

// Keep reference to click handler to unbind it.
var dismissClickHandler = function (evt) {
if (element[0] !== evt.target) {
// Issue #3973
// Firefox treats right click as a click on document
if (element[0] !== evt.target && evt.which !== 3) {
resetMatches();
if (!$rootScope.$$phase) {
scope.$digest();
Expand Down

0 comments on commit 7d1c460

Please sign in to comment.