Skip to content

Context menu bugs: duplicate items & more #746

Closed
mikefromcanada opened this Issue Mar 10, 2013 · 17 comments

4 participants

@mikefromcanada

Just playing around trying to incorporate the new context menus into my app.
Ran into a couple of bugs, still trying to reproduce some.

Here's a fairly big one though:
Context menus don't play well with bb.PushScreen and bb.PopScreen.
See example here: https://github.com/mikefromcanada/bbui-context

Context menu item pushes new screen
Screen1

Back button clicked on new screen
Screen2

Context menu now shows duplicate items
Screen3

Items keep increasing if you repeat the actions.

@tneil
Open Source Projects member
tneil commented Mar 10, 2013

Make sure you have the absolute latest.. The duplicate problem was fixed with the following commit at the beginning of last week. 6a0a108

Can you confirm that you have the latest and if the issue persists

@mikefromcanada

I'm using version 0.9.6.125 which I believe is the most recent build. Issue still persists

@bglowDragosh

I am getting the same issue in my app. Using 0.9.6.125

[Update] Just tried packaging my app using the bbUI.js file instead of the minified bbui-min.js. The bug is gone.

@bglowDragosh

Scratch that, I'm still getting the bug, sorry for multi-posting.

@tneil
Open Source Projects member
tneil commented Mar 11, 2013

Strange.. I hadn't been able to reproduce that.. I'll mark this for investigation

@mikefromcanada

Another update that might help:
The duplicate items appear on every context menu in the application.
Is there a stack of items that's not getting cleared properly?

For example, in my app I have a total of 3 pages with separate context menus.
When I create a duplicate item by using bb.popScreen on one screen, that duplicate shows up in all 3 context menus in the app.

@tneil
Open Source Projects member
tneil commented Mar 13, 2013

Yeah, that's the strange part.. I tested that a couple times, found a problem and fixed it. So it is weird that it is still happening for others. I'm going to look into it.

The webworks context menu is one menu that can be manipulated. The bbUI code is designed to clear the menu first before it is shown each time the event fires. So something is going wrong with the clearing code.

@bearisgaming

Seeing the same thing on the app I am working on after upgrading to .125.

@tneil
Open Source Projects member
tneil commented Mar 14, 2013

Hmm.. question for you guys.. Are you also including the bbUI BB10 webworks extension that is needed for the bbUI context menu to work. Details are outlined in the Prerequisites section of the context menu documentation.

@bglowDragosh

I am, yes. Before also including those files my app would not load at all

@bearisgaming

Same here. I wasn't able to load the app without doing so as well.

@mikefromcanada

Same here. Are you still not able to reproduce Tim?

@tneil
Open Source Projects member
tneil commented Mar 15, 2013

It was just something that I thought of. I won't be back in the office until Monday to try and track down the issue.

@tneil
Open Source Projects member
tneil commented Mar 18, 2013

Really strange, I cannot reproduce it here. Can you try it with the sample in the repo.. go into the context menu screen, back, go back into context menu screen. I don't get duplicates.

My environment:

  • bbUI: 0.9.6.125
  • Software Release: 10.0.10.85
  • OS Version: 10.0.10.672
@mikefromcanada

It will work in the scenario you gave, but that's not the scenario where the bug occurs. It happens when you push a screen on top of the context menu screen.

Main -> context menu -> back to main -> context menu --- won't cause the bug
Main -> context menu -> screen pushed from context menu -> back to context menu --- will cause the bug

My sample above is just the sample from the repo with everything else pulled out and a blank bb.pushScreen added to the context menu screen.

@tneil
Open Source Projects member
tneil commented Mar 18, 2013

ah.. got it.. I'll give that a try

@tneil tneil pushed a commit that referenced this issue Mar 18, 2013
Tim Neil fixed duplicate context menu items for issue #746 c64e92d
@tneil
Open Source Projects member
tneil commented Mar 18, 2013

Ok.. this should now be fixed.. I was able to reproduce the scenario, and from testing the latest update will solve the problem

@tneil tneil closed this Mar 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.