Closed Bug 1370965 Opened 7 years ago Closed 7 years ago

"Edit page" and "View page history" in article context menu don't work

Categories

(developer.mozilla.org Graveyard :: Wiki pages, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheppy, Assigned: sheppy)

References

Details

(Keywords: in-triage)

The "Edit page" and "View page history" options that are included in the contextual menu when you right-click in an article on MDN stopped working sometime in the last few days; these need to be fixed since they're a huge convenience when working in larger articles.
Adding to the context menu appears to be Firefox-only

The code is in wiki.js, and hasn't changed in years:

  https://github.com/mozilla/kuma/blob/754f61b24220b0601dc370142dc4fd7614e85a47/kuma/static/js/wiki.js#L520

  location.href = $(e.target).data('action') + '?src=context';

If I run this instead, I get redirected to the edit page:

  window.location.href = $(e.target).data('action') + '?src=context';

Maybe a change in FF 53?
This is Firefox only because nobody else has implemented the context menu feature of HTML5 yet. Chrome had an implementation in work but has removed it due to them wanting there to be changes to the spec and a lack of anyone to work on the code. And apparently we don't match the spec at this time, either.

I'm going to work on this, since it will only take a few minutes (famous last words) and is relevant to my interests personally.
Assignee: nobody → eshepherd
PR 4262 submitted.
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/3e655647d7e6e96629ed72b37464bf61179b8342
Bug 1370965: Fix context menu to work again.

https://github.com/mozilla/kuma/commit/9c2ca2f3c0a798aeb1a68ecf59c122dd8efa636a
Merge pull request #4262 from a2sheppy/a2sheppy/fix-context-menu

Bug 1370965: Fix context menu to work again.
Fix deployed to staging and production, context menu works in FF 53.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
See Also: → 1395314
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.