Controlling the Scroll Indicator autoHide
by Mitchell Simoens
Sencha Touch has a scroller that works and looks the same across all platforms. Both axes (x and y, horizontal and vertical respectively) can have their own scrolling indicator, as you would expect, but are set to hide by default. In some cases, you may want to always show the indicators. New in Touch 2.3.0, each indicator has an
autoHide configuration that allows you to control it. Setting
false will tell that indicator not to auto-hide. You can use the
indicators config within the
scrollable config on a Container or subclass.
For example, you can set the
autoHide config to
false for the y indicator. This makes the y indicator always show. Since the x indicator is left to its default, it will automatically hide.
You can see this in action at https://fiddle.sencha.com/#fiddle/1u9.
Mouseenter Versus Mouseover Event Listeners
by Seth Lemmons
In Ext JS, you can listen for mouse cursor events on a dom element in order to do things like add or remove a CSS class to said element. One event you can listen for is the
mouseover event. However, the
mouseover event will fire as the cursor enters the element in addition to passing the cursor over other nested elements. This can be aggravating if you only want the event to fire as the cursor first enters.
In this case, you should use the
mouseenter event instead. This will allow you to monitor the cursor’s initial entry into the bounds of the element.
You can see this in action at https://fiddle.sencha.com/#fiddle/43q.