Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Fungovanie tejto stránky je z dôvodu údržby dočasne obmedzené. Ak článok nevyrieši váš problém a chcete položiť otázku, napíšte našej komunite podpory na Twitter @FirefoxSupport alebo Reddit /r/firefox.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

Scrollbars used in a:hover

  • 1 odpoveď
  • 3 majú tento problém
  • 8 zobrazení
  • Posledná odpoveď od Shadow110

more options

I have a container for a left-sided navigation panel. In this panel, I have a list of links. Some of these links are too long to fit with the width and we don't want to wrap the lines. So we came up with the following idea: Clip the long lines. However, when hovering over them, present a scrollbar to allow scrolling just the single line which is too long.

I came up with a CSS using something like this (where ".panel" sets the width of the navigation panel):

.panel a {

 display: block;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;

}

.panel a:hover {

 overflow-x: auto;
 text-overflow: clip;

}

Now, this works in that when hovering over a too long link a scrollbar is presented right below the link. However, the functionality of this scrollbar is as follows:

(1) You can click on the left and right triangles to scroll the content of the link by character left or right, respectively. (2) You can click in the space between a triangle and the scrollbar handle to scroll the content of the link "page" wise.

but when you

(3) click and hold the scrollbar handle, the content is moved a few pixels and then the whole content is used for a drag-and-drop action. I.e., click and hold on the scrollbar handle is considered to be click and hold on the content itself.

This is on Firefox 57.0.2.

(Just for completeness: In IE 11 the behaviour is different: The scrollbar works as expected. When clicking and holding on the link itself, drag-and-drop action happens.)

I appreciate any ideas to solve this.

Peter

I have a container for a left-sided navigation panel. In this panel, I have a list of links. Some of these links are too long to fit with the width and we don't want to wrap the lines. So we came up with the following idea: Clip the long lines. However, when hovering over them, present a scrollbar to allow scrolling just the single line which is too long. I came up with a CSS using something like this (where ".panel" sets the width of the navigation panel): .panel a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .panel a:hover { overflow-x: auto; text-overflow: clip; } Now, this works in that when hovering over a too long link a scrollbar is presented right below the link. However, the functionality of this scrollbar is as follows: (1) You can click on the left and right triangles to scroll the content of the link by character left or right, respectively. (2) You can click in the space between a triangle and the scrollbar handle to scroll the content of the link "page" wise. but when you (3) click and hold the scrollbar handle, the content is moved a few pixels and then the whole content is used for a drag-and-drop action. I.e., click and hold on the scrollbar handle is considered to be click and hold on the content itself. This is on Firefox 57.0.2. (Just for completeness: In IE 11 the behaviour is different: The scrollbar works as expected. When clicking and holding on the link itself, drag-and-drop action happens.) I appreciate any ideas to solve this. Peter

Všetky odpovede (1)

more options

No ideas