Mouse & Touch plugins not detecting mouse - up event

0 favourites
  • 5 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Problem Description

    Mouse & Touch plugins not detecting mouse - up event when a browser alert is issued.

    Attach a Capx ... .capx?dl=0

    Description of Capx

    Demonstrates that the Mouse up event does not fire after a browser alert is issued, causing in game problems when trying to detect if the mouse button (or touch) is being used currently.

    Steps to Reproduce Bug

    • Run game, note the text boxes display current status of mouse
    • Click the left mouse button and hold it down, and then press any key on the keyboard, and it'll issue a browser alert (after the alert shows up, let go of the mouse button)
    • With the mouse, or keyboard, press the OK button on the browser alert.

    Observed Result

    It still thinks the mouse button (or touch) is down even though it isn't.

    Expected Result

    It should either send a mouse up event, or simply detect the mouse is no longer pressed, even if not sending the mouse up event.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7 SP1

    Construct 2 Version ID


  • I could not reproduce the bug on IE11 with mouse or touch.

    On Firefox I could only reproduce it if the alert is cleared with the mouse. If it is cleared with the keyboard then there is no problem.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I was only testing with IE 8 (Blame IBM with their shit tecsys software), Chrome, and Firefox. And like you said, I only really used the mouse to click the "ok" button... never really tried with the enter\space.

  • Closing as won't fix. It's probably the browser failing to issue the mouse up event. But alert dialogs are hacky and should only be used for testing - they are modal, pause the entire game, and don't work on some platforms/environments at all, so don't use them for real games.

    IE8 does not support HTML5 at all so I don't know how you could have tested with that!

  • My bad - it was IE10. Regardless, this still happens... but it happens on (the other 'browser' as well, wink wink) And unfortunately, there is no way to get around using those dialogs on THAT browser. Perhaps it's just an issue with that particular browser, but it would have been nice to have a work-around.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)