Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-webkit-text-security compatibility

Tags:

css

I have set text-security:disc; in the following manner but it is not working in firefox.

text-security:disc;
-webkit-text-security:disc;
-mox-text-security:disc;

I am setting these properties to input[type='number'] field. Any suggestion?

like image 386
sagarpatidar Avatar asked Sep 13 '14 11:09

sagarpatidar


People also ask

What is the meaning by compatibility?

Definition of compatible (Entry 1 of 2) 1 : capable of existing together in harmony compatible theories compatible people. 2 : capable of cross-fertilizing freely or uniting vegetatively. 3 : capable of forming a homogeneous mixture that neither separates nor is altered by chemical interaction.

What is an example of compatibility?

The definition of compatibility means how well two things work or go together. When a couple and wife get along well and enjoy spending time together, this is an example of compatibility. When a printer works with your computer hardware, this is an example of compatibility.

What does compatible mean in a person?

If you say that you are compatible with someone, you mean that you have a good relationship with them because you have similar opinions and interests. Mildred and I are very compatible.


1 Answers

window.onload = function() {
    init(); 
}

function init() {
    var x = document.getElementsByTagName("input")[0];
    var style = window.getComputedStyle(x);
    console.log(style);

    if (style.webkitTextSecurity) {
        // Do nothing
    } else {
        x.setAttribute("type", "password");
    }
}

CSS

input {
    text-security: disc;
    -webkit-text-security: disc;
    -moz-text-security: disc;
}
like image 74
Richa Avatar answered Sep 22 '22 02:09

Richa