Hi,
I'm using the server side wrappers to generate a numericTextBox like so
@Html.Kendo().NumericTextBoxFor(m => m.SumInsured).Format(
"{0:C}"
).Culture(
"en-GB"
).HtmlAttributes(
new
{ @placeholder =
"Sum Insured"
, style =
"display: inline-block;"
})
This generate the following HTML:
<
span
class
=
"k-widget k-numerictextbox"
style
=
""
><
span
class
=
"k-numeric-wrap k-state-default"
><
input
type
=
"text"
class
=
"k-formatted-value k-input"
title
=
""
tabindex
=
"0"
placeholder
=
"Sum Insured"
role
=
"spinbutton"
style
=
"display: block;"
aria-disabled
=
"false"
><
input
data-val
=
"true"
data-val-number
=
"The field SumInsured must be a number."
id
=
"SumInsured"
name
=
"SumInsured"
placeholder
=
"Sum Insured"
style
=
"display: none;"
type
=
"text"
value
=
""
data-role
=
"numerictextbox"
role
=
"spinbutton"
class
=
"k-input"
aria-disabled
=
"false"
><
span
class
=
"k-icon k-i-warning"
style
=
"display: none;"
></
span
><
span
class
=
"k-select"
><
span
unselectable
=
"on"
class
=
"k-link k-link-increase"
aria-label
=
"Increase value"
title
=
"Increase value"
><
span
unselectable
=
"on"
class
=
"k-icon k-i-arrow-60-up"
></
span
></
span
><
span
unselectable
=
"on"
class
=
"k-link k-link-decrease"
aria-label
=
"Decrease value"
title
=
"Decrease value"
><
span
unselectable
=
"on"
class
=
"k-icon k-i-arrow-60-down"
></
span
></
span
></
span
></
span
></
span
>
The problem is that because of the inline style (display: block) applied to the first input element it causes rendering issues in that the box appears to be two lines high. When you then go to change the value the first input is hidden and the second input again has an inline style (display: block) applied which has the same styling issue. In the demos I notice that instead of display: block; display: inline-block is used which does correct the issue. I'm using the same release 2017.3.1026 as the demos. I've also tried by setting an explicit inline-block through the HtmlAttributes function. I also tried with a basic input element and using the API to render the NumericTextBox but it still has the same effect. If it has an relevance this is inside of a kendo window. Any ideas as to why block instead of inline-block is applied through the JS?
Thanks,