Borders scroll and select div content when you click and move the mouse cursor on them. Should mouse on borders scroll or select the content of an element?




8 years ago
8 years ago


(Reporter: agustin.skorp, Unassigned)


5 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)



(1 attachment)



8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729)

When I have a div element and the value for overflow is set in auto, and I click on the left border of the div, it scrolls to the left, and not only that, it starts selecting the text inside the div element.

It's a problem if you have a div that fits the whole window but with a 1px border. And if you move the mouse to the right of the screen and you try to scroll it doesn't respond as you wish it to respond (to move the vertical scroll bar).

I think I could fix it eliminating the right border making the scroll bar be there instead of the border. But if I have a border, why is it scrolling and selecting the content when I move the mouse on it?

Top, bottom and left borders have the same behaviour.
Is this on purpose?
Scrolling to the right at the same time it performs a selection on the text as you move the mouse up and down doesn't seem two tasks one would like to perform at the same time.

Should this be considered an unexpected behaviour, therefore a bug?

Thanks for you help.

This is the code I used to test if it happens all the time:

<div style="overflow:auto;position:absolute;border:10px solid black;top:200;left:200;width:200;height:200">
<div style="position:absolute;border:1px solid black;top:50;left:50;width:1000;height:1000">

<div style="overflow:auto;position:absolute;border:1px solid black;top:200;right:0;width:200;height:200">
<div style="position:absolute;border:1px solid black;top:50;left:50;width:1000;height:1000">

Reproducible: Always

Steps to Reproduce:
1. Create an html containing a div with a border of 1px solid black and overflow:auto and text inside it.
2. Overflow the content.
3. Click on the right or bottom border and keep the button down, then move the mouse along it or even outside it without unpressing the mouse button.
4. Try the same with different values of the border thickness.
Actual Results:  
The scroll bars move towards the border you clicked. And the text inside the div is being selected.

Expected Results:  
Nothing whouls happen if you click a border since it isn't the inner content of the div.


8 years ago
Severity: minor → normal
Priority: -- → P1
Version: unspecified → 3.6 Branch


8 years ago
Priority: P1 → --

Comment 1

8 years ago
Reporter -> Are you still experiencing this issue with the latest version of Firefox 5?

Please provide a public URL or attach a reduced test case the exhibits this issue.

Comment 2

8 years ago
Hello Tim, thanks for your answer!

The same behaviour is observed on Firefox 5.0, lastest version with the same html code example provided on the original report.

Comment 3

8 years ago
The body tag is closed twice in the example code:

3<div style="overflow:auto;position:absolute;border:10px solid 4black;top:200;left:200;width:200;height:200">
5<div style="position:absolute;border:1px solid 6black;top:50;left:50;width:1000;height:1000">
11<div style="overflow:auto;position:absolute;border:1px solid 12black;top:200;right:0;width:200;height:200">
13<div style="position:absolute;border:1px solid 14black;top:50;left:50;width:1000;height:1000">

Line 9 and 17. Should line 9 be removed?
Version: 3.6 Branch → 5 Branch

Comment 4

8 years ago
Yes, line 9 is a mistake and should be removed.

Comment 5

8 years ago
Created attachment 542046 [details]


8 years ago
Component: General → General
Product: Firefox → Core
QA Contact: general → general

Comment 6

8 years ago
Still an issue on Mozilla/5.0 (Windows NT 5.1; rv:8.0a1) Gecko/20110802 Firefox/8.0a1 ID:20110802030845
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.