We are setting a editor to be 100% width via css due to the known issue below. Which works but the "edit field" does not get 100% width and therefore you can only touch a portion of the control to get it to focus. When you set the 2nd line to 100% then when you type in the field the text does not appear on the screen. Since we are using the ASP.NET MVC wrappers to build the control it is being wrapped in a span. What is the best way to get this control to function properly with 100% width via css since you cannot pass "100%" to the width property of the MVC Wrapper??
.ui-ig-edit {width: 100% !important; height:25px;}
.ui-ig-edit > .ui-igedit-field {width: auto !important; text-align:left !important;}
This is from the known issues:
Width and height options can be set only absolutely (in pixels) under certain conditions
If the editor’s base element is not an <input> or <textarea> element and buttons, theme, or renderInContainer options are enabled, then the width and height options can be set only absolutely (in pixels).
Workaround
Yeah it is getting applied. I tried both scenarios so with the auto width set on the child I cannot click anywhere in the edit for it to take focus. If I remove that the issue with resize appears where the text is hidden if you resize the screen. I was going to compare with your sample to see if the elements looked the same.
Which one is not working?
I've posted all you need in your view, except the script references. Can you check if the class is correctly applied to the span element?
Thanks,
Can you post your sample? It is not working for me..
Hi Tammy Wohirabe,
Here is a possible workaround, which includes !important. But keep in mind it's not recommended to use important directives.
<style> } .editorWidth { width: 100% !important; } </style>
<div style="background-color: red; width: 90%">
@Html.Infragistics().TextEditor().ButtonType(TextEditorButtonType.Clear).Height(25).HideEnterKey(false).ID("id").NullText("null Text").SelectionOnFocus(TextEditorSelectionOnFocus.SelectAll).HtmlAttributes(new System.Collections.Generic.Dictionary<string,object>() { { "class", "editorWidth" }}).Render()
</div>
In that case the editor is placed inside div with width set to 90%, and once its resized the editor is resizing too.
Hope that helps,
Hi Tammy,
I am still waiting to hear back from our developers on this.
If I do not hear from them by Monday morning I am going to follow up with them again.