mirror of https://github.com/docusealco/docuseal
parent
3975a03cb4
commit
72bbdb38bf
@ -0,0 +1,18 @@
|
|||||||
|
export default class extends HTMLElement {
|
||||||
|
connectedCallback () {
|
||||||
|
const maskedToken = this.input.value
|
||||||
|
|
||||||
|
this.input.addEventListener('focus', () => {
|
||||||
|
this.input.value = this.dataset.token
|
||||||
|
this.input.select()
|
||||||
|
})
|
||||||
|
|
||||||
|
this.input.addEventListener('focusout', () => {
|
||||||
|
this.input.value = maskedToken
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
get input () {
|
||||||
|
return this.querySelector('input')
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue