Announcement

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

    Submit event is still fired with modal window shown

    Hi there,

    we have recently discovered that a submit event in a form with autoFocus = true is still being fired when there is a modal window in front of the form's view. As the modal window blocks the view below, firing the event should not be possible though.
    This is illustrated in the example below when pressing enter after it is loaded without closing the warning window.

    Regards

    Code:
    isc.warn("This is a modal warning window");
    isc.DynamicForm.create({
        ID:"simpleForm",
        layoutAlign: "center",
        height: 48,
        saveOnEnter: "true",
        autoFocus: "true",
        fields: [
            {name: "submit to toggle background color", type: "text", },
        ],
        submit : function (callback, requestProperties) {
            if (this.backgroundColor == "red") {
                this.setBackgroundColor("white")
                }
            else {
                this.setBackgroundColor("red")
                }
        }
    });
    Best regards

    #2
    This code creates and draws top-level components after a modal dialog is shown, so the component is not masked, focus goes to it, and an Enter keypress should trigger submit.

    Do you have an example of submit not being prevented, which doesn't have this usage issue?

    Comment

    Working...
    X