brettz9 / jump-to-anchor

Jump to the closest anchor for a selected element
MIT License
9 stars 2 forks source link

Context menu entry shown twice #6

Closed rugk closed 8 years ago

rugk commented 8 years ago

Sometimes the context menu entry is shown two times directly under each other. After I click on one entry the other one disappears.

However I don't know really by what this is caused, but it happens regularly. I still have to figure out a way to reproduce this.

brettz9 commented 8 years ago

The issue is when you have text highlighted on the page. Unfortunately the allowable contexts (at https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/context-menu#Specifying_contexts ) overlap. It is possible though that I could workaround this by avoiding the special context for selections and then just use the regular web API for detecting highlighted text. That might work. Or I could rename the menus to indicate that one item is relative to the selected text, and another one relative to where the user right-clicks.

rugk commented 8 years ago

Okay, at least good to know that this is a known-issue.

brettz9 commented 8 years ago

I've addressed this in 0.5.2 by distinguishing the text for click point or highlighted selections as the reference point (waiting on AMO approval).