If autocomplete=’off’, autocomplete=’new-password’, set type=”text” first

                       <input
                        type="text"
                        autocomplete='off'
                        data-type="receive"
                        class="inputBlock form-control receive__pwd"
                      />
Copy the code
     // Change the focus to password --password clears auto-fill in the browser
              $(".delivery__pwd,.receive__pwd").off("input").on("focus".function(e){
                  e.preventDefault()
                  $(this).on("input".function(){
                    if(! $(this).val()){
                        $(this).attr("readonly"."true"The $()this).blur()
                        let _this = this
                        setTimeout(() = >{
                          $(_this).attr("readonly".false)
                          $(_this).attr("type"."text"The $()this).focus()
                        },0)}else{$(this).attr("type"."password"}})}) $(".delivery__pwd,.receive__pwd").on("click".function(){$(this).attr("readonly".falseThe $()this).focus()
            })
            $(".delivery__pwd,.receive__pwd").on("mousedown".function(e){
              if(! $(this).val()){
                e.preventDefault()
                $(this).blur()
                setTimeout(() = >{$(this).focus()
                },0)
                return}})// Out-of-focus check
          $('.delivery__pwd,.receive__pwd').on('blur'.function(){$(this).attr("readonly".true)
            // Other operations
          })
Copy the code