본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

"Open Link in New Tab" item JUMPS AROUND on Context Menu!

  • 8 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: Slouch

more options

In FF v60, I noticed some strange behavior with the context menu when right-clicking on a link.

The "Open Link in New Tab" menu item arbitrarily jumps around on the menu with each new tab opened, even though I have CSS that specifically sets it as the second menu item.

Sometimes it will become the last item on the menu, or the third to last item, or third from the top. It literally changes places at random! See attached screen images.

Things worked fine in v59, but v60 presents this very puzzling issue.

Here is the CSS from my userChrome.css file to make "Open Link in New Tab" the second menu item...

#contentAreaContextMenu > * { -moz-box-ordinal-group: 2; }
#context-openlink { -moz-box-ordinal-group: 1 !important;}

#placesContext > * {-moz-box-ordinal-group:4;}
#placesContext_open\:newwindow {-moz-box-ordinal-group:1!important;}
#placesContext_open\:newtab {-moz-box-ordinal-group:2!important;}
#placesContext_open {-moz-box-ordinal-group:3!important;}

Why is the context menu continuously rotating the "Open Link in New Tab" item to different positions?

Quite frustrating when years of "muscle memory" has trained me to look for this as the second menu item, and now my custom CSS no longer holds it in place :-)

Thanks!

In FF v60, I noticed some strange behavior with the context menu when right-clicking on a link. The "Open Link in New Tab" menu item arbitrarily jumps around on the menu with each new tab opened, even though I have CSS that specifically sets it as the second menu item. Sometimes it will become the last item on the menu, or the third to last item, or third from the top. It literally changes places at random! See attached screen images. Things worked fine in v59, but v60 presents this very puzzling issue. Here is the CSS from my userChrome.css file to make "Open Link in New Tab" the second menu item... #contentAreaContextMenu > * { -moz-box-ordinal-group: 2; } #context-openlink { -moz-box-ordinal-group: 1 !important;} #placesContext > * {-moz-box-ordinal-group:4;} #placesContext_open\:newwindow {-moz-box-ordinal-group:1!important;} #placesContext_open\:newtab {-moz-box-ordinal-group:2!important;} #placesContext_open {-moz-box-ordinal-group:3!important;} Why is the context menu continuously rotating the "Open Link in New Tab" item to different positions? Quite frustrating when years of "muscle memory" has trained me to look for this as the second menu item, and now my custom CSS no longer holds it in place :-) Thanks!
첨부된 스크린샷

글쓴이 Slouch 수정일시

선택된 해결법

Slouch said

The "Open Link in New Tab" menu item arbitrarily jumps around on the menu with each new tab opened, even though I have CSS that specifically sets it as the second menu item.

Very funny screenshots; I definitely cannot explain it.

However, you do not have a specific group level for Open Link in New Tab on the content area context menu. Since it apparently likes to roam, try this:

/* Default for items at the main level of context menu */
#contentAreaContextMenu > menu, 
#contentAreaContextMenu > menuitem, 
#contentAreaContextMenu > menuseparator, 
#contentAreaContextMenu > menugroup {
  -moz-box-ordinal-group: 3; 
}
/* Open Link in New Window FIRST */
#context-openlink { 
  -moz-box-ordinal-group: 1 !important;
}
/* Open Link in New Tab SECOND */
#context-openlinkintab {
  -moz-box-ordinal-group: 2 !important;
}
문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (8)

more options

What's with the stray characters of *, >, and / sprinkled throughout the code?

Typically the two characters * & / are used in pairs for the purpose of inserting a comment for line of code; open and close notations for comments depending upon their order. Try getting rid of those 4 stray characters and see if that batch of code is read more consistently; it may be confusing Firefox resulting in unpredictable behavior.

more options

Thanks for your reply, the-edmeister.

I have removed those stray characters you mentioned, and now have the following CSS...

#contentAreaContextMenu { -moz-box-ordinal-group: 2; }
#context-openlink { -moz-box-ordinal-group: 1 !important;}
#placesContext {-moz-box-ordinal-group:4;}
#placesContext_open:newwindow {-moz-box-ordinal-group:1!important;}
#placesContext_open:newtab {-moz-box-ordinal-group:2!important;}
#placesContext_open {-moz-box-ordinal-group:3!important;}

I must have found the previous code online (stray characters and all). Funny thing is, it worked fine until version 60.

The context menu now appears with the items in their default order (see image). I don't think my code is having any effect. Open Link in New Tab is the first item, and I would like it to be second.

Can you possibly suggest some code to accomplish that?

Regards.

more options

선택된 해결법

Slouch said

The "Open Link in New Tab" menu item arbitrarily jumps around on the menu with each new tab opened, even though I have CSS that specifically sets it as the second menu item.

Very funny screenshots; I definitely cannot explain it.

However, you do not have a specific group level for Open Link in New Tab on the content area context menu. Since it apparently likes to roam, try this:

/* Default for items at the main level of context menu */
#contentAreaContextMenu > menu, 
#contentAreaContextMenu > menuitem, 
#contentAreaContextMenu > menuseparator, 
#contentAreaContextMenu > menugroup {
  -moz-box-ordinal-group: 3; 
}
/* Open Link in New Window FIRST */
#context-openlink { 
  -moz-box-ordinal-group: 1 !important;
}
/* Open Link in New Tab SECOND */
#context-openlinkintab {
  -moz-box-ordinal-group: 2 !important;
}
more options

the-edmeister said

What's with the stray characters of *, >, and / sprinkled throughout the code?

They might not be stray characters.

  • The > indicates a parent-child relationship between two selectors. (MDN)
  • The * is a wildcard that matches everything. (MDN) I think these are considered to hurt performance, so I try not to use them.
  • I don't know what the \ does, but it may mean that the : is a literal part of the id rather than having its usual significance (for example, in :hover, :not() or other pseudo-class or pseudo-element). Although, I don't think : is legal in an id.

글쓴이 jscher2000 - Support Volunteer 수정일시

more options

Thank you jscher2000.

So far your suggested code is working.

I guess I hastily grabbed someone else's malformed code a couple of years back, which miraculously worked until the current version.

Hopefully the menu item stays put now :)

more options

Glad to hear it's stable for you.

Note: I only replaced the first two lines of your rules. The others are related to the context menu for bookmarks (and maybe also history).

more options

The backslash in places IDs to escape the ':' is quite normal for #placesContext IDs.

#placesContext_open\:newtab
#placesContext_openContainer\:tabs
#placesContext_openLinks\:tabs
#placesContext_open\:newwindow
#placesContext_open\:newprivatewindow
#placesContext_openSeparator
#placesContext_new\:bookmark
#placesContext_new\:folder
#placesContext_new\:separator
more options

Thank you cor-el. Good information to know :)