The problem with the scrollbar inside the channel only with FireFox

So, the problem is this: With Firefox, if you try to click and drag the scroll that is inside the link, it will just try to move the link area. Normal click and mouse scrolling work, but clicking and dragging does not occur.

This demonstrates the problem ( only in firefox ) http://jsfiddle.net/jz6jW/

Any ideas on how to get past this?

Edit: for my own situation, this solves the problem. http://jsfiddle.net/jz6jW/7/ (to add links to both text and img instead of just putting everything in links)

+3
source share
3

. , Firefox . span-with-scrollbar <a>, <a>, , .

, Firefox, <a> <span>:

<span class="container">
    <a href="#">
        Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus
    </a>
</span>

.container {
    width: 300px;
    height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    float: left;
}

http://jsfiddle.net/ambiguous/6rg4m/

UPDATE. http://jsfiddle.net/ambiguous/wPyms/ CSS :

.Text {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    float: left;
    position: absolute;
}

( ), . , , , ? CSS Firefox ( , ).

, , . jsfiddle , .

HTML:

<div class="Cont">
    <a href="#">
        <!-- ... -->
    </a>
</div>

CSS

.Cont {
    float: left;
    position: relative;
    background-color: #888;
    width: 400px;
    height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    background: url(http://farm3.static.flickr.com/2654/3822981633_abc0213105.jpg);
}

.Cont a {
    color: #fff;
    text-decoration: none;
    display: block;
}

Live: http://jsfiddle.net/ambiguous/EgUwH/2/

, .

+2

This is a very old Firefox bug since 2006. Surprisingly, this has not been recorded until today. And I was happy to meet him.

After some experimentation, I found the fix quite simple, remove the attribute hrefin the element <a>.

This works great in Firefox:

<a>
    <span class="container">
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus
    </span>
</a>
0
source

All Articles