2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

fix: don't attempt to blur/focus search element if it doesn't exist (#1340)

This commit is contained in:
Jeff Sagal
2020-12-19 15:52:51 -08:00
committed by GitHub
parent fbe24c0e10
commit 876992b1d3
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Vue Select Dev</title> <title>Vue Select Dev</title>
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.5.3/css/foundation.min.css">--> <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.5.3/css/foundation.min.css">-->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css">--> <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css">-->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">--> <!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">-->
+1 -1
View File
@@ -751,7 +751,7 @@
...([this.$refs['clearButton']] || []), ...([this.$refs['clearButton']] || []),
]; ];
if (ignoredButtons.some(ref => ref.contains(event.target) || ref === event.target)) { if (this.searchEl === undefined || ignoredButtons.filter(Boolean).some(ref => ref.contains(event.target) || ref === event.target)) {
event.preventDefault(); event.preventDefault();
return; return;
} }