Is there any event triggered when the user tapped elsewhere outside of an Ext.form.Panel ?
Thanks in advance,
Well in that case you should listen to tap on area of component which is outside the panel.
You can listen to something that happens not something that doesn't happen.
Btw if your panel is modal window and somebody is tapping on masked part of viewport then you can hide it(if that's what you want) using hideOnMaskTap config: http://docs.sencha.com/touch/2-1/#!/api/Ext.Container-cfg-hideOnMaskTap
Related
I have several display objects in createjs and event using easeljs i want to prevent from mouse and touch event passing through them.
i want like a easy one liner like .mouseEnabled or .mouseChildren is there something will will prevent any other interaction for the objcts below this. i can try adding all events to a backdrop movieclip which tint background color and prevent default and stopPropogation will that help?
so how to i prevent from any type of interaction taking place in canvas just by placing a displayobject that's like wall which will not allow the other displayobjects from getting click, mouseover or touch events.
You can add obj.mouseEnabled= obj.mouseChildren = false; to any you don't want to receive events.
If you just want to block events with a child on top, simply add a mouse handler to it.
cover.on("click", function(){});
You don't need stopPropagation, since that will only prevent events from bubbling in the current hierarchy (ie, surfacing an event to its direct parent). Events do not "pass through" objects that have mouse handlers on them.
Hope that helps!
I would like to have a small menu that closes if the user interacts with any other component. For example if the user tries to scroll or interact with any of the content in a scrollview behind the menu (see the image below for reference).
I have two ideas for how this might be achieved:
A transparent layer behind the menu with an absolute position and dimensions matching the device. If this layer registers a touch event the menu can be dismissed. The problem with this is that from the users perspective the touch event was totally ignored. So for this to work well I would need to be able to still pass the touch event through the absolute layer to the content behind it.
Add callbacks to every component that could be interacted with to notify the menu that it should close. This option seems like it would be very messy and because of the large number of components in my use case it is not practical to implement and maintain.
Is there an other proper way to solve this problem? Can any of the issues I raised with the ideas above be resolved or mitigated?
Wrap your view with a TouchableWithoutFeedback component and provide it a onPress callback that hides the menu if it's open. Depending on how top-level the 'expand' icon is, you may want to track the menu's visibility in redux and dispatch an action onPress to track globally.
I'm kind of pulling my hair out here. I have a single window application with a NSscrollView and custom NSViews inside of the scroll view. The custom NSViews are registering mouseUP and mouseDown events but my problem is that when the app/window is inactive and you click on it anywhere to make it active the mouseUP and mouseDown events are being triggered in the NSView that you click on.
I overrode the '(BOOL)acceptsFirstMouse:(NSEvent *)theEvent' to return NO just to be sure (i know this is the default.
I can't figure out what I'm doing wrong. I'm principally an iOS developer so my OS X experience is not super extensive. Any input helps. Thanks!
Found the issue. I had a NSTexField on the subview that was capturing the first mouseDown event. Just overlooked it.
I have a VB.net MDI app that contains a modal window (normal window shown as modal). I have a custom title bar button that disappears if the user clicks outside the modal area.
Normally, clicking off a modal will cause the system to beep and then flash the title bar of the modal window.
I want to know how to detect when the flashing is complete (using WndProc if possible) so I can redraw the custom button.
Anyone know how this could be done? Thanks!
It's been a while, but I believe your window should be receiving a WM_NCPAINT message when the frame needs to repaint.
It turns out that I had the WndProc(m) line in the wrong spot.
As the question is asked ... how can i prevent that from happening?
I have ZOOM IN and ZOOM OUT button that receive focus after pressed.
The button in CF does not have focus property so im guessing im required to do another painful workaround...
Any ideas?
This is the way the system draws the buttons when clicked. If you don't want this you'll have to redraw the button (and it various states) yourself