Bug Report T305220
Visible to All Users

TokenBox cuts an input string if Properties.NullText is set

created 9 years ago (modified 9 years ago)

I have a TokenBox on my FormLayout:

C#
@model SampleProj.ViewModels.MyClass @Html.DevExpress().FormLayout(settings => {     settings.Name = "formLayout";     settings.Width = Unit.Percentage(100);     settings.Items.AddGroupItem(group =>     {         group.GroupBoxDecoration = GroupBoxDecoration.None;         group.Width = Unit.Percentage(100);         group.Items.Add(item =>         {             item.Name = "formLayoutGroupTokens";             item.NestedExtensionType = FormLayoutNestedExtensionItemType.TokenBox;             var tbSettings = (TokenBoxSettings)item.NestedExtensionSettings;             tbSettings.Properties.NullText = "Enter text";             tbSettings.Name = "Text"; tbSettings.Properties.ValidationSettings.Assign(SampleProj.ViewModels.ValidationHelper.CommonValidationSettingsRequired("Field required at least one token"));             tbSettings.Width = Unit.Percentage(100);             item.Caption = "Tokens";         }); }); }).GetHtml()

But when I copy some text with comma or semi-colon separators from clipboard, the output token box shows only first item from text.
When I continue press ctrl+V, token box add next item from text but only one:

Text:
111;222;333;444

Output:

  1. 111x
    -> ctrl+V
  2. 111x 222x
    -> ctrl+V
  3. 111x 222x 333x
    -> ctrl+V
  4. 111x 222x 333x 444x

Now I press again ctrl+V:

5)111x 222x 333x 444111x

Then after pressing ctrl+V token box will ignore anything from input text.

What I should do to correct such behavior?

Thanks a lot!

Comments (2)
DevExpress Support Team 9 years ago

    Hello Nikita,

    I reproduced this behavior. We need additional time to research it. We will update this thread once we have results.

    DevExpress Support Team 9 years ago

      Hello Nikita,

      While our developers are working on changing the described behavior, I suggest you don't use the TokenBoxProperties.Properties.NullText property as a temporary solution to overcome the problem.

      Answers approved by DevExpress Support

      created 9 years ago (modified 9 years ago)

      We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

      Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.