brettz9 / jump-to-anchor

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

Context Menu Item Missing On name= Anchors #1

Closed fantasai closed 9 years ago

fantasai commented 9 years ago

Has no problem finding name= anchors, but if I click on the element itself, the context menu is missing. Try e.g. clicking on the header here: http://www.w3.org/TR/CSS21/tables.html#table-display

(Otherwise, thank you so much for writing this extension.)

brettz9 commented 9 years ago

Oh, glad you found that, thanks. Firefox's SDK allows for 3 kinds of contexts for context menu activation, and I mistakenly thought the "PageContext" would work when you clicked anywhere without a selection, but apparently it only works when you click on an area which is not a node proper.

I've fixed, tested, and uploaded a new version (0.3.4) to AMO.

You can either try the new version at https://addons.mozilla.org/en-US/firefox/addon/jump-to-anchor/versions/ or wait for Mozilla to do a code review.

If you wait for a code review, one workaround you can use in the meantime is to either highlight part of the text for the element in question or click beyond where there is a node like in this case, to the right of the heading--and then right-click to get to "Jump to anchor".

Either way, Mozilla is usually pretty quick reviewing simple SDK add-ons like this.

Btw, I recently created an add-on, HTMLEditor (also awaiting review) which might come in handy for you too, as it allows you to click an icon in your toolbar to open a tab for on-the-fly (syntax-highlighted) HTML testing (I prefer it to JSFiddle for really quick tests) though I really should make the default HTML skeleton customizable, e.g., to allow one to start with empty style tags already in place.

On the other hand, as a spec editor, I guess you may have all of the browser behaviors already memorized. :)

brettz9 commented 9 years ago

Looks like it's already been approved :) I will close for now, but feel free to comment on how it goes...

fantasai commented 9 years ago

Works fine, thanks for the fix! Will check out HTMLEditor later. :)

brettz9 commented 9 years ago

Ok, great... And if you didn't see my comment on your review, please do yourself a favor and check out HeadingsMap if you haven't already: https://addons.mozilla.org/en-US/firefox/addon/headingsmap/ . Use it all the time, especially with specs...