ant-design-blazor/components/core/JsInterop/HtmlElement.cs
MihailsKuzmins c0f8859914 fix(module: input): preserve focus and caret position for input password when visibility is toggled (#1377)
* set focus when the password button is clicked

* add methods for selection

* set selectionStart after Focus

* fix typescript

* set selectionEnd as well

* fix a stupid if-condition-bug

* remove checks for element

* add selectionStart to getDomInfo

* get selectionStart from Element

* delete unneeded js method

Co-authored-by: mihails.kuzmins <mihails.kuzmins@daytongroup.lv>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-18 08:06:06 +00:00

53 lines
1.4 KiB
C#

using System.Text.Json.Serialization;
namespace AntDesign.JsInterop
{
public class HtmlElement
{
[JsonPropertyName("absoluteTop")]
public int AbsoluteTop { get; set; }
[JsonPropertyName("absoluteLeft")]
public int AbsoluteLeft { get; set; }
[JsonPropertyName("offsetTop")]
public int OffsetTop { get; set; }
[JsonPropertyName("offsetLeft")]
public int OffsetLeft { get; set; }
[JsonPropertyName("offsetWidth")]
public int OffsetWidth { get; set; }
[JsonPropertyName("offsetHeight")]
public int OffsetHeight { get; set; }
[JsonPropertyName("scrollHeight")]
public int ScrollHeight { get; set; }
[JsonPropertyName("scrollWidth")]
public int ScrollWidth { get; set; }
[JsonPropertyName("scrollLeft")]
public double ScrollLeft { get; set; }
[JsonPropertyName("scrollTop")]
public double ScrollTop { get; set; }
[JsonPropertyName("clientTop")]
public int ClientTop { get; set; }
[JsonPropertyName("clientLeft")]
public int ClientLeft { get; set; }
[JsonPropertyName("clientHeight")]
public int ClientHeight { get; set; }
[JsonPropertyName("clientWidth")]
public int ClientWidth { get; set; }
[JsonPropertyName("selectionStart")]
public int SelectionStart { get; set; }
}
}