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

Commit 7d1c460

Browse files
committed
fix(typeahead): don't close popup on right click
- Ensure typeahead popup does not dismiss on right click in Firefox Closes #3975 Fixes #3973
1 parent 8ae1a76 commit 7d1c460

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/typeahead/typeahead.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
377377

378378
// Keep reference to click handler to unbind it.
379379
var dismissClickHandler = function (evt) {
380-
if (element[0] !== evt.target) {
380+
// Issue #3973
381+
// Firefox treats right click as a click on document
382+
if (element[0] !== evt.target && evt.which !== 3) {
381383
resetMatches();
382384
if (!$rootScope.$$phase) {
383385
scope.$digest();

0 commit comments

Comments
 (0)