Hi Isomorphic,
I often want to close windows very quickly. ESC would work perfect for that.
But there seems to be some focus issue. The window itself can't have focus and won't have it after show()ing.
Please see this sample (SNAPSHOT_v12.0d_2017-07-20).
I can get what I want if I modify it like this:
Is there something I can do to have this behavior by default? IMHO it will be the expected behavior.
I could set canFocus: true in Window.setDefaultProperties(), but I'd still need the modalWindow.focus().
Is there some reason that you did not set canFocus: true?
Is there some reason I should not set canFocus: true?
Thank you & Best regards
Blama
I often want to close windows very quickly. ESC would work perfect for that.
But there seems to be some focus issue. The window itself can't have focus and won't have it after show()ing.
Please see this sample (SNAPSHOT_v12.0d_2017-07-20).
I can get what I want if I modify it like this:
Code:
isc.IButton.create({ ID: "button", autoDraw: false, title: "Show Window", click : function () { modalWindow.show(); [B]modalWindow.focus();[/B] } }); isc.VLayout.create({ defaultLayoutAlign: "center", members: [ button ] }); isc.Window.create({ ID: "modalWindow", title: "Modal Window", autoSize:true, autoCenter: true, isModal: true, showModalMask: true, autoDraw: false, [B]canFocus: true,[/B] items: [ isc.DynamicForm.create({ autoDraw: false, height: 48, padding:4, fields: [ {name: "field1", type: "select", valueMap: ["foo", "bar"]}, {name: "field2", type: "date"}, {type: "button", title: "Done", click: "modalWindow.hide();" } ] }) ] });
I could set canFocus: true in Window.setDefaultProperties(), but I'd still need the modalWindow.focus().
Is there some reason that you did not set canFocus: true?
Is there some reason I should not set canFocus: true?
Thank you & Best regards
Blama
Comment