6 Replies Latest reply on Apr 6, 2017 2:34 PM by serval

    Popover Click-through

    emma@happysoftware.com

      Product and version

      - FileMaker Pro Advanced 14.0.6, 15.0.1.119,

      - FileMaker Go 14.0.4 (I did not test on 15)

      - (FileMaker WebDirect does NOT have this issue)

      OS and version

      - Windows 7 Professional

      - iOS 10.2

      Hardware

      - PC

      - Apple iPad Mini

      Description

      When I have a popover open, and I run an onObjectExit script, clicking off of the popover to a place where I have a hidden button, the button executes, even though it was not visible when I clicked. I have attached the file, and a video of the bug.

       

      Setup:

      I have two objects on my layout, a button, and a popover. The button, has a show/hide condition where it hides if a variable $$POPOVER_OPEN is true or 1. The popover has no show/hide condition, but does have two script triggers (onObjectEnter and onObjectExit). The onObjectEnter trigger sets the $$POPOVER_OPEN variable to true or 1, and then refreshes the button.  The onObjectExit script trigger sets the $$POPOVER_OPEN variable to "", and then refreshes the button.

       

      If I open the popover, and then click off where I know the hidden button to be, the button executes the script associated with it.  If I open the popover, and then click off where I know the hidden button not to be, the button does not execute the script.

       

      How to replicate

      See Description, or Use the attached file.

       

      Workaround (if any)

      Add the Close Popover, and the Halt Script steps to the end of the onObjectExit script.

        • 1. Re: Popover Click-through
          TSGal

          emma:

           

          Thank you for your post.

           

          When you click outside a Popover, the OnObjectExit script executes before the mouse click is interpreted, so what you have is expected behavior.  That is, the hidden button is made visible before the mouse click is interpreted.  Adding the Close Popover and Halt Script steps to the end of the OnObjectExit script is the correct action so that the hidden button is not executed.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Popover Click-through
            emma@happysoftware.com

            tsgal,

             

            I would never expect a button that is hidden to execute, regardless of where the user clicks on the screen.

             

            Thoughts, anyone?

            • 3. Re: Popover Click-through
              TSGal

              emma:

               

              A button does not execute if hidden.  However, the click isn't registered until after the OnObjectExit script completes, which by that time, the button is no longer hidden.  If you don't have an OnObjectExit script, clicking on the hidden button will have no effect.

               

              TSGal

              FileMaker, Inc.

              • 4. Re: Popover Click-through
                emma@happysoftware.com

                tsgal,

                 

                It seems to me that the click should be "interpreted" as being on white space, as that's what the user clicked. 

                • 5. Re: Popover Click-through
                  TSGal

                  emma:

                   

                  The click on the white space first interprets the OnObjectExit.  This updates the variable and unhides the button.  The click now interprets the unhidden button.  This is as designed.

                   

                  The correct procedure to cancel the clicking of the button, as you have discovered, is to close the popover in the script and then halt the script, as this will cancel the outside click processing.

                   

                  TSGal

                  FileMaker, Inc.

                  • 6. Re: Popover Click-through
                    serval

                    I agree that the action that occurs is exactly what should occur. Clicking outside the popover IS exiting the popover before the button is clicked, so the OnObjectExit should run before the button click. That the button was not visible when the user clicked yet still executes is the programmer's error, not Filemaker's, and TSgal has given emma the minor change she needs to make to handle this. Changing Filemaker to not run the button in this case would cause Filemaker to deviate from the logical sequence of events and would no doubt cause other unexpected consequences.