fix: PIN copy revert uses data-pin instead of captured text
Clicking while showing "Copied!" captured "Copied!" as the revert value, so the PIN text never returned. Now uses the stable data-pin attribute as the revert source.
This commit is contained in:
@@ -197,9 +197,8 @@ class SupportPinHelper
|
||||
var textEl = this.querySelector('.mokosuiteclient-pin-text');
|
||||
navigator.clipboard.writeText(pin).then(function() {
|
||||
if (textEl) {
|
||||
var orig = textEl.textContent;
|
||||
textEl.textContent = 'Copied!';
|
||||
setTimeout(function() { textEl.textContent = orig; }, 30000);
|
||||
setTimeout(function() { textEl.textContent = pin; }, 30000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user