using data-bb-context="true" and works as expected, the peek menu shows up, but it doesn't go away unless I press/select a context menu item, pressing elsewhere has no effect, it also doesn't expand into the full context menu like in cascades which doesn't make the peek menu very useful.
I'm testing this with v0.9.4 (next branch) and the Dev Alpha 10.0.9 OS on a DevAlpha B and when I use the press and hold an image list with a context menu I get the following
Are these the same results that you are seeing?
I'm using v0.9.4 and 10.0.9 on Dev Alpha A.
when using data-bb-context="true" on an image list, I get a peek menu.
I'll take a look. They keep tweaking the cascades context menu :o)
Also noticed one more issue, while scrolling the image list, if the finger stays on the screen too long, context menu will still be triggered. Probably not the right behavior.
Would it be possible to touch+hold a list item to open the peek menu and swipe the menu from right-to-left to open it like the real context menu? I can not add the context menu directly since the onclick handler of the items will push another screen, so the peek menu is the best choice but at this time I'm unable to read the entries when the peek menu is shown.
I'm trying to figure out why this isn't working for you... If you take the sample from the repo ("next" branch) and open the Context Menu sample page, the press and hold context menu is working exactly like this on my Dev Alpha B
I took the da8fddd build and deployed the sample to dev alpha a, and I get the same behaviour as I posted above except when I clicked the screen behind menu, the context menu goes away. The only difference between the sample and my app I can think of is that my image list contents are dynamically added rather than static. Could that have made any difference? In my app, the screen behind the peek menu is fully functional, whereas in the sample the screen behind isn't and when touched, the menu goes away.
Are you adding your image list items with the new JS interfaces, or doing it the old way shown in the samples?
using appendItem, I assume that's the new interface.
Yes, appendItem should be the new interface
The peek context menu is something really great if it would be working for me. Like when you open a website in the browser, touch+hold a link on the page it will show the peek menu and you are able to swipe it to open completely to show all entries in there. But this isn't working for bbUI.js peek context menu at this time and would be great if it will be available in the future like shown here: http://imageshack.us/a/img39/7892/img00000005changed.jpg
I "draw" an image-list on screenready event and it is styled+shown like expected. Also the touch+hold works to open the peek context menu, but I can not swipe the peek context menu to fully open up.
Hi @tneil, email is on its way to you.
Ok.. I've been able to reproduce it.. I'll start debugging
Good to know that it isn't just a problem of mine.
Looks like the issue has to do with screens that have both a context menu and action overflow items on the Action Bar
Sounds promissing to me! Hope you can get it fixed!! Thx very much for your hard work on bbUI.js!!!
I think I have it fixed.. just doing some final testing
fixes for context menu issue #355
Ok, I've pushed up the changes into the "next" branch.. give them a try and see how they work
I tried, but with no luck. I can not swipe to open the peek menu. I downloaded the latest version 0.9.4 of both, .css and .js, but it seems to not work. Something I'm missing?
Also the buttons/entries in the context menu seem to not be clickable in any case. Sometimes it works, sometimes I need some more tries to get the onclick handler for the item.
Ok.. this is driving me bonkers... I'm running your code on a device in your app and it is working. Can you list the following:
No problem, I give you all the things you need to know:
Hope this helps to figure out what is going on or send me a Dev Alpha B to get little bit deeper into it ;-)
The fix solved one issue, now when I click on the screen outside/behind the context menu, the menu goes away,
One more note: scrolling with the finger on the image list too long still triggers the peek menu
@wslfung is really right, now the context menu goes away when touching a blank area outside the peek context menu but nothing else is working well for me here, especially touching an item in the peek context menu will not in every case work, sometimes I need to touch/click some more times to get the action fired.
And, yes, in my use case I have only 2 items in a image-list and when touching the scroll is coming up and when going on with scrolling the peek context is shown.
I worked with the iScroll in some other projects and I added some variable to make sure nothing else happens when user is scrolling. I use the onScrollMove event to set a variable called isScrolling to be true and 120 milliseconds after the onScrollEnd this is set to false to make sure the scroll has ended to trigger other actions then.
@wslfung I haven't done anything around the touch of the context menu itself when it is peeking. Looking at the apps on the latest OS touching the context menu (not on a button) will show the menu. I'll have to add that as a feature
@wslfung and @RonMen The onclick sensitivity of the items is a browser/device combination issue. It is better on DevAlpha B and will see more OS tweaks leading to gold. The onclick of the item simply isn't firing.
@wslfung and @RonMen I haven't looked at the scrolling with the finger on the image causing the context menu to show.
On the swiping action.. are you starting the touch of your swiping action on the actual menu? Or on the screen area? The code currently is to capture the swipe on the screen area. Starting with a touch on the context menu itself will not currently swipe
by swiping, I mean the swiping from the menu out to the screen area which you've address and can be treated as a feature request.
AND thanks for your efforts, it's actually great to get replies in such short period which isn't always seen, and fixes are coming in by the day, which is awesome.
If I select an item on the image-list I use and swipe the scroller appears and after some seconds, like @wslfung mentioned, the peek context menu is shown.
It would really good to be able to show the complete context menu like in the picture I added before using the browser. The peek menu comes up and I can swipe right-to-left to open it completely.
Where to go to get the BB10 Dev Alpha B?? ;-)
ok.. At least I'm not going insane on the swiping then :o) The classic "working as designed" but not all the desired interactions.
So to re-cap:
yep, what you described is correct. just missed the bug where scrolling with the finger on the image-list too long triggers the peek menu. If I'm scrolling, it shouldn't trigger the menu.
@tneil + @wslfung: Combined both last posts and the list is complete!! ;-)
updates for issue #355
Just uploaded the fixes for:
more fixes for issue #355
Added as much of a fix I can get for now with
It looks like if you are swiping slowly it will work, but if you do a quick swipe, the ontouchstart isn't firing on the menu for whatever reason. So my gesture doesn't take hold.
Probably because of the hiding of the title when in peek mode, the buttons now shift down as the full context is shown.
more updates for issue #355
@wslfung the shifting buttons have been fixed in the latest commit
I'm going to open up two new issues for the following so that we can track them separately. I'll also likely assign them to the 0.9.5 milestone. I'm trying to get v0.9.4 merged down into master because of all the changes that support the new 10.0.9 release of the BB10 DevAlpha OS
For reference the two new issues have been added: