aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-09 12:35:20 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-09 12:35:20 +1000
commit2fd138563bb0c017a1072e79fe78e6479086e9d1 (patch)
tree01134072066465f180e72fef1912fe805938afb7 /src/components
parent345c96f99aa98d5e90a46fa3f175ec0a2e6d4f36 (diff)
Fix search suggestions wrong-text on mobile
Turns out the input wasn't converted to lowercase before being matched with suggestion data, and this was more noticeable on mobile due to auto-capitalisation
Diffstat (limited to 'src/components')
-rw-r--r--src/components/SearchModal.vue2
-rw-r--r--src/components/TileInfoModal.vue2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue
index 9dc8f9b..025ed71 100644
--- a/src/components/SearchModal.vue
+++ b/src/components/SearchModal.vue
@@ -92,7 +92,7 @@ export default defineComponent({
},
suggDisplayStrings(): [string, string, string][] {
let result: [string, string, string][] = [];
- let input = this.suggsInput;
+ let input = this.suggsInput.toLowerCase();
// For each SearchSugg
for (let sugg of this.searchSuggs){
let idx = sugg.name.indexOf(input);
diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue
index a70215d..556846a 100644
--- a/src/components/TileInfoModal.vue
+++ b/src/components/TileInfoModal.vue
@@ -240,7 +240,7 @@ export default defineComponent({
onLinkIconClick(evt: Event){
// Copy link to clipboard
let url = new URL(window.location.href);
- url.search = new URLSearchParams({node: this.nodeName});
+ url.search = (new URLSearchParams({node: this.nodeName})).toString();
navigator.clipboard.writeText(url.toString());
// Show visual indicator
this.linkCopied = true;