mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
mask key
This commit is contained in:
1 parent
3975a03cb4
commit
72bbdb38bf
4 files changed
+27
-3
No files matched your search
@@ -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')
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user