romaonthego/REMenu

Menu selection bounds needs another check

steve-h opened this issue · 0 comments

I am using presentation in a Rect from a press elsewhere on the screen and the menu acts like a popover menu without all the background dimming. (Using iPad so menu is not the width of the screen)

In Module REMenuItemView proc touchesEnded
I had to add an x-coordinate check:

if (endedPoint.x < 0 || endedPoint.x > CGRectGetWidth(self.bounds))
return;

If the menu was presented beside the place where the touch occurred then whatever item was at same y-coord was selected.

I'm not experienced enough with Git yet to create a Pull request for this, sorry.