瀏覽代碼

the fix for the issue where chrome thought the SensitiveInput input was a password field

Erick Joseph 9 月之前
父節點
當前提交
3569fe9c73
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/lib/components/common/SensitiveInput.svelte

+ 8 - 1
src/lib/components/common/SensitiveInput.svelte

@@ -14,12 +14,13 @@
 <div class={outerClassName}>
 	<input
 		class={inputClassName}
+		class:dot={!show}
 		{placeholder}
 		bind:value
 		required={required && !readOnly}
 		disabled={readOnly}
 		autocomplete="off"
-		{...{ type: show ? 'text' : 'password' }}
+		type="text"
 	/>
 	<button
 		class={showButtonClassName}
@@ -61,3 +62,9 @@
 		{/if}
 	</button>
 </div>
+
+<style>
+	.dot {
+		-webkit-text-security: disc;
+	}
+</style>