I use custom inputfield class have these problems

I want to use this custom class but encounter these problems:

  1. During execution, this custom Inputfield object loses focus?
    Cannot enter characters in the field
    How to fix it?
  2. Why are some functions of the custom inputfield disabled in the Inspector?

This is my test code, searched from the Internet~

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
using System.ComponentModel;
using UnityEngine.Events;
using UnityEngine.Serialization;

public class CustomInputField : InputField
{
     public bool Focused = false;
     public bool Deactivated = false;


    new public void ActivateInputField()
    {
        Focused = true;
        base.ActivateInputField();
    }

    public override void OnDeselect(BaseEventData eventData)
    {
        Deactivated = true;
        DeactivateInputField();
        base.OnDeselect(eventData);
    }

    public override void OnPointerClick(PointerEventData eventData)
    {
        if (Deactivated)
        {
            MoveTextEnd(true);
            Deactivated = false;
        }
        base.OnPointerClick(eventData);
    }

    protected override void LateUpdate()
    {
        base.LateUpdate();
        if (Focused)
        {
            MoveTextEnd(true);
            Focused = false;
        }
    }
}



The problem I want to solve has been solved by the properties of the
-onFocusSlecteall: Fasle

Solve problems indirectly