Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    canDrag and staticTextItem

    SmartClient Version: SNAPSHOT_v13.1d_2024-10-18/AllModules Development Only (built 2024-10-18)

    Hello, I've got a form (with canDrag: true) that contains staticText items. Normally, the text is selectable, so the drag can't be initiated. However, I noticed that even after disabling text selection, the drag still doesn't start. Is this the expected behavior?

    You can try it in this sample by attempting to drag the mouse over "bob" or "bob@isomorphic.com":

    Code:
    isc.DynamicForm.create({
        ID: "exampleForm", border: "2px solid red", canDrag: true,
        canEdit: false, readOnlyDisplay: "static",
        dragStart: function () {
            isc.logEcho("drag start")
            return this.Super('dragStart', arguments);
        },
        fields: [
            {
                name: "username",
                readOnlyCanSelectText: ["readOnly"],
                title: "Username",
                type: "text",
                width: "*",
                required: true,
                defaultValue: "bob"
            },
            {
                name: "email",
                readOnlyCanSelectText: ["readOnly"],
                title: "Email",
                required: true,
                width: "*",
                type: "text",
                defaultValue: "bob@isomorphic.com"
            },
            {
                name: "password",
                title: "Password",
                width: "*",
                required: true,
                type: "password"
            },
            {
                name: "password2",
                required: true,
                title: "Password again",
                width: "*",
                type: "password",
                wrapTitle: false
            }
        ]
    });

    #2
    Thanks for the clear test case. We agree with your conclusion and we've made a change to the dragging behavior so now drag of the form as a whole will be allowed if it doesn't interfere with text selection, as in your example

    Comment


      #3
      SmartClient Version: SNAPSHOT_v13.1d_2024-10-23/AllModules Development Only (built 2024-10-23)

      I see it's fixed, thank you very much

      Comment

      Working...
      X