Search result submit selected first
This commit is contained in:
parent
f3693162ab
commit
231d24b26a
@ -13,7 +13,10 @@ export class Search {
|
|||||||
form.style.float = 'right'
|
form.style.float = 'right'
|
||||||
form.style.marginRight = '20px'
|
form.style.marginRight = '20px'
|
||||||
form.onsubmit = () => {
|
form.onsubmit = () => {
|
||||||
var items = document.getElementsByClassName('tapi-search-result')
|
var items = document.getElementsByClassName('tapi-search-result-selected')
|
||||||
|
if (items.length === 0) {
|
||||||
|
items = document.getElementsByClassName('tapi-search-result')
|
||||||
|
}
|
||||||
if (items.length > 0) {
|
if (items.length > 0) {
|
||||||
this.dial((<HTMLElement>items[0]).dataset.tapiNumber)
|
this.dial((<HTMLElement>items[0]).dataset.tapiNumber)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user