mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Cap tag matches to 10 on macOS/Qt5 to work around Chromium perf issue
Closes #1825
This commit is contained in:
parent
a989e50838
commit
6f0d86b9a9
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
import Popover from "../../components/Popover.svelte";
|
import Popover from "../../components/Popover.svelte";
|
||||||
import WithFloating from "../../components/WithFloating.svelte";
|
import WithFloating from "../../components/WithFloating.svelte";
|
||||||
|
import { isApplePlatform } from "../../lib/platform";
|
||||||
import AutocompleteItem from "./AutocompleteItem.svelte";
|
import AutocompleteItem from "./AutocompleteItem.svelte";
|
||||||
|
|
||||||
export let suggestionsPromise: Promise<string[]>;
|
export let suggestionsPromise: Promise<string[]>;
|
||||||
|
@ -16,6 +17,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
let suggestionsItems: string[] = [];
|
let suggestionsItems: string[] = [];
|
||||||
$: suggestionsPromise.then((items) => {
|
$: suggestionsPromise.then((items) => {
|
||||||
show.set(items.length > 0);
|
show.set(items.length > 0);
|
||||||
|
if (isApplePlatform() && navigator.userAgent.match(/Chrome\/77/)) {
|
||||||
|
items = items.slice(0, 10);
|
||||||
|
}
|
||||||
suggestionsItems = items;
|
suggestionsItems = items;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue