1 2 3 Previous Next 42 Replies Latest reply on Jun 10, 2015 5:56 AM by Magnus Fransson

    Beware about Esc key on custom dialog (Windows only)

    Fred(CH)

      Hi,

       

      I just wanted to share an important information with you.

       

      It is not a "fresh scoop", because it is true since -at least- v11, but after 7 years working with FileMaker (it was with v9), i just realized it this morning and it is an horrible one. So it is very possible that you missed it too :


      On Windows OS only, when a dialog created by the Show Custom Dialog step is displayed, [ESC] key act as [ENTER] key. In other words, both are invoking the default button.


      Suppose a such dialog :

      "Are you sure to empty trash ?"

      [Cancel] [OK]


      [ESC] key, as well as [Enter] key, will return 1 with Get ( LastDialogChoice ) cal function.


      This morning, one of my user lost all his entries by pressing ESC two times, a bit stressed, validating two warnings without seeing them.

        • 1. Re: Beware about Esc key on custom dialog (Windows only)
          intex

          Can reproduce it - thanks for the hint.

           

          UNBELIEVABLE

          • 2. Re: Beware about Esc key on custom dialog (Windows only)
            KenNewell

            Do you get the same behavior when you set the ESC off ?

            • 3. Re: Beware about Esc key on custom dialog (Windows only)
              Fred(CH)

              Do you get the same behavior when you set the ESC off ?

              Sorry but i don't understand the tip. Could you extend ?

              • 4. Re: Beware about Esc key on custom dialog (Windows only)
                steveromig

                Frédéric Dupuget wrote:

                 

                Hi,

                 

                I just wanted to share an important information with you.

                 

                It is not a "fresh scoop", because it is true since -at least- v11, but after 7 years working with FileMaker (it was with v9), i just realized it this morning and it is an horrible one. So it is very possible that you missed it too :


                On Windows OS only, when a dialog created by the Show Custom Dialog step is displayed, [ESC] key act as [ENTER] key. In other words, both are invoking the default button.


                Suppose a such dialog :

                "Are you sure to empty trash ?"

                [Cancel] [OK]


                [ESC] key, as well as [Enter] key, will return 1 with Get ( LastDialogChoice ) cal function.


                This morning, one of my user lost all his entries by pressing ESC two times, a bit stressed, validating two warnings without seeing them.

                 

                All -

                 

                Depending on the side of the fence you land on - this may not be as bad as you think it is.

                 

                The ESC does indeed take the action of the DEFAULT button in a custom dialog box on the Windows platform.  In other words, it acts like hitting the ENTER key.  So, if your OK button is the default button then hitting ESC could (or could not) do something you do not want it to.  This behavior has been around for quiet some time as Frédéric mentioned.

                 

                If this may be problematic, you can re-define your custom dialog box and specifically the buttons to take into the account the behavior of the ESC key.

                 

                With that said, there is a thread in "Report an issue" that you can chime in on if need be.

                 

                http://forums.filemaker.com/posts/7f647e3e44

                 

                This behavior is, in part, due to not being able to determine what any of the buttons in the custom dialog actually are (any of them could be the cancel button, for example)

                 

                Steve Romig

                FileMaker, Inc.

                • 5. Re: Beware about Esc key on custom dialog (Windows only)
                  Fred(CH)

                  Dear Steve,

                   

                  I friendly disagree .

                   

                  I believe you cannot find any other example where [ESC] key is assimilated as [ENTER] key, except in FileMaker software. But i would really appreciate if i am wrong and let you correct me with pleasure.

                   

                  Moreover, all such differences between Mac and Windows version are "bad", by essence.

                   

                  Finally i AM precisely "the Fred" who chimed on the thread's issue you reffered, and as a proof, i have the exact same photo on both forums .

                   

                  Sincerly,

                   

                  -Fred

                  -Fred(CH)

                  -Frédéric Dupuget

                  -ComptaBase Sàrl

                  • 6. Re: Beware about Esc key on custom dialog (Windows only)
                    Extensitech

                    Examples just from random things that are open on my desktop:

                     

                    Remote desktop - clicking esc closes the dialog, but does not perform the highlighted button (connect).

                    (Note that this is expected behavior on Win even if there's no cancel button.)

                     

                    This behavior is, in part, due to not being able to determine what any of the buttons in the custom dialog actually are (any of them could be the cancel button, for example)

                     

                    Steve Romig

                    FileMaker, Inc.

                     

                    rdc.png

                    Paint, where I was saving this screenshot (low-tech, I know!) - clicking esc closes the dialog, but does not perform the highlighted button (save)

                    paint.png

                    And then, just to make this crystal clear: FileMaker, Open Remote (!!!) - - clicking esc closes the dialog, but does not perform the highlighted button (Open). Again, note that this is the case even though there's no cancel button.

                    openRemote.png

                    I have seen no program, on Windows nor on Mac, where "esc" means "select the default button", except FM, and only on Windows.

                     

                    This has, indeed, been around a while in FM, and no doubt there are plenty of other people, besides Fred and myself, who've been caught by this very non-standard behavior.

                     

                    If this may be problematic, you can re-define your custom dialog box and specifically the buttons to take into the account the behavior of the ESC key.

                     

                    There is no FM function to tell us that the user hit esc vs. clicking the default button. If there were, we could at least trap for it and enforce OS standards ourselves. Yes, we could theoretically make all custom dialogs have "cancel" as the first button. This is way outside the norm for both users and developers, though. Take a look at FM's own dialogs for several examples of where the rightmost and/or default button isn't "cancel".

                     

                    On a Mac, the esc key is ignored in a custom dialog, which still isn't standard for Windows but at least would "do no harm".

                     

                    I suspect that if there were a similar issue on a Mac, which worked counter to the conventions of OSX, no one would have any trouble calling it a "bug". For Windows users, it's hard to come up with another thing to call this. "Expected misbehavior"?

                     

                    Chris Cain

                    Extensitech

                    • 7. Re: Beware about Esc key on custom dialog (Windows only)
                      planteg

                      Hi Steve,

                       

                      not sure about the Esc behavior you describe. I have not programmed for Windows for a while, if my memory serves me well, at least in Visual Basic, you can check the Enter button property for a button, and the Escape button property for another one. This way you specifically set what action Escape will execute if hit. That means the same event will be fired whether you type Escape or click the button that is set to be the Escape button.

                       

                      On Windows, and probably on OS X also, the interface rule is to set the Enter button to execute the action that is the less damageable. For example, if prompting the user "Do you wish to delete this file" with Yes and No buttons, the No button should be the default button.

                       

                      Gilles Plante

                      • 8. Re: Beware about Esc key on custom dialog (Windows only)
                        flukey

                        Regardless of whether or not FM can tell which button is the cancel button, there is no excuse for allowing the escape key to press one of the buttons if they do not know which button is being pressed.  In this case they should simply ignore the the ESC button press.

                         

                        In just about every modern software system I have used in the last 25 years or so, ESC means cancel or do not take any action.

                        • 9. Re: Beware about Esc key on custom dialog (Windows only)
                          jormond

                          It should at the very least act the same on either OS... I agree there is no excuse for it not behaving the same on either platform.  With that said, I've known this for a while...and made my "Cancel" button the default.

                          • 10. Re: Beware about Esc key on custom dialog (Windows only)
                            Extensitech

                            I agree about not putting a destructive button as the default button.

                             

                            I do wish we could specify which was the default button. Note in my three random screenshots, none have the right-most button as the default.

                             

                            Notice that in all three cases, there isn't really a "destructive" option. However, if these dialogs did connect, save or open (respectively) when I clicked esc, it would not make sense to me as a user, and I'd think of it as a bug.


                            Where there is not a destructive button, the default button is usually the most likely, wherever that button may fall. Buttons don't tend to switch around to position themselves on one side or another depending on the action, except with FM custom dialogs.

                             

                            From a user expectations standpoint, Esc and Enter are about the farthest from being the same button as two buttons can be.

                             

                            Chris Cain

                            Extensitech

                            • 11. Re: Beware about Esc key on custom dialog (Windows only)
                              Fred(CH)

                              On Windows, and probably on OS X also, the interface rule is to set the Enter button to execute the action that is the less damageable. For example, if prompting the user "Do you wish to delete this file" with Yes and No buttons, the No button should be the default button.

                              But to be accurate, my first exemple was true in real life : on both Mac and Windows, when you empty the trash, the default button is "Yes" (delete the files).  Only difference : the default button is placed on the very left by Windows and on the very right by OS X.

                              • 12. Re: Beware about Esc key on custom dialog (Windows only)
                                AllegroDataSolutions

                                FWIW - As a matter of routine, I usually make Cancel the default button (unless we're in a situation where the user would seldom if ever want to cancel the operation.)

                                 

                                Another option would be not to have the layout automatically save record changes (assuming that the dialog was in a script that acted on only one record).

                                • 13. Re: Beware about Esc key on custom dialog (Windows only)
                                  hbrendel

                                  All this discussion...

                                  Custom Dialog sucks big time, it's not the only issue. What about position/height/width. Very poor possibilities for checkboxes/radio buttons/comboboxes/lists. Unintuitive processing of input. The necessity to use a field for input. I can go on.

                                  I use a dialog plug-in. For years the only use of Custom Dialog was to inform the user that the plug-in was missing (if it was). Now, since 13 you can handle the issue with a popover.

                                  I gave up about Custom Dialog for 20+ years...

                                  • 14. Re: Beware about Esc key on custom dialog (Windows only)
                                    Fred(CH)

                                    Please note i just came here with facts, in order to warn people, who are actually using this feature, about a potential problem.

                                     

                                    If you don't use this feature for whatever reason, i assume this specific issue won't occur for you. Thus, my warning is useless in your case.

                                    1 2 3 Previous Next