locked
The click event doesn't work after add the mouseover event of flyout

    Question

  • Hi, my issue is as follow:

    There're two events for a button, one is click event, another is when the mouse over the button, it will popup a flyout which explain the use of the button.

    The click event doesn't work after I add the mouseover event. And when I debug, I find out the cause may be the flyout. 

    The click event can work if the mouseover event doesn't use flyout.

    Is there any solution to this issue?Should I use something else to replace flyout?

    Thank you!

    Sunday, September 1, 2013 4:42 PM

Answers

  • Hi, philiafzy

    You must dismiss the flyout, so that the event of other controls can work. I suggest you can use the ToolTip instead of flyout. In your project you can attaches the Tooltip directly to the button element by setting the data-win-control and data-win-options properties on the button:

    <button class="action" data-win-control="WinJS.UI.Tooltip" data-win-options="{innerHTML:'our account will be charged $252.'}" id="buyButton">Buy</button>

    When you move the mouse over the button, the ToolTip show and also you can click the button to do something.

    Best Wishes!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by philiafzy Tuesday, September 3, 2013 5:04 AM
    Monday, September 2, 2013 7:42 AM