selection-sharer icon indicating copy to clipboard operation
selection-sharer copied to clipboard

Context popup menu far from the mouse

Open dandv opened this issue 10 years ago • 4 comments

When you select downward text that comprises multiple lines, the Y coordinate of the context menu is at the beginning of the selection. The X is correct.

@molily's component doesn't suffer from this problem (demo).

context popup menu far from the mouse

dandv avatar Jun 03 '15 07:06 dandv

Fixed in my fork of SelectionMenu that addresses a few other issues from selection-sharer and makes it general (i.e you can put anything you want in the menu).

dandv avatar Jun 03 '15 18:06 dandv

@dandv can you submit a pull request so that everybody can benefit from it? Thanks!

xdamman avatar Jun 23 '15 03:06 xdamman

@xdamman: in the meantime our fork evolved quite radically by using HubSpot's Drop library (which prevents #20 in selection-sharer).

Perhaps it's best we continue efforts in that direction?

dandv avatar Jul 30 '15 09:07 dandv

I think it is smarter to show the menu directly where the mouse was released.

Change line 148

var top = topOffset + self.getPosition().y - self.$popover.height();

to:

var top = e.pageY - self.$popover.height() - 10;

q2apro avatar Jul 13 '17 13:07 q2apro