Open
Bug 167396
Opened 22 years ago
Updated 2 years ago
Can't select text w/ mouse, and can't unselect after "Select All": RFE: pref to prevent JS blocking text selection
Categories
(Core :: DOM: Selection, enhancement)
Core
DOM: Selection
Tracking
()
NEW
People
(Reporter: bugs, Unassigned)
References
Details
Attachments
(1 file)
486 bytes,
text/html
|
Details |
Steps to reproduce: 1. Load the URL 2. Try to select main body text w/ mouse - won't work 3. Use Edit->Select All to select all text 4. Try to unselect main body text w/ mouse - also won't work Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826
Comment 1•22 years ago
|
||
The site does this on purpose. function disableselect(e){ return false } function reEnable(){ return true } document.onselectstart=new Function ("return false") if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable }
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
OK, then how can I unselect the text? (Excepting disabling javascript, or reloading the page) To put it another way: Is the page broken, or mozilla has a bug, or is this behavior the perfect one?
Comment 3•22 years ago
|
||
Mozilla is doing what the page asked it to do. The page is doing something _I_ think is stupid, but I'm sure they have their reasons for it (or something). They're very definitely doing it on purpose, though....
And I almost forget: Is it also correct to have right click disabled on the page? (I'm going to file another bug for this, it's a serious problem about browser control)
Comment 5•22 years ago
|
||
Yes. The page does that on purpose too: document.oncontextmenu=new Function("return false") That bug is already filed; just search for "oncontextmenu"
Comment 6•22 years ago
|
||
Reopening to request a pref (with UI in Scripts & Windows) to ignore web pages' attempts to prevent the user from selecting text, or, rather, that the behavior is simply changed without adding yet another pref.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 7•22 years ago
|
||
There are legitimate uses for this functionality... eg if you want the user to be able to drag-drop chunks of text on the page without having little "selection trails" behind the mouse all the time...
Comment 8•22 years ago
|
||
Just as legitimate uses can be thought of for most of the functionalities we have prefs for in Scripts & Windows, but that doesn't make the abuse any less annoying.
Comment 9•22 years ago
|
||
Just realized you asked for a pref, not a default behavior. Sure, a pref I can see. ;)
Severity: major → enhancement
OS: Linux → All
Hardware: PC → All
Comment 11•22 years ago
|
||
Workaround: use the Jesse's JavaScript Shell bookmarklet: http://www.squarefree.com/bookmarklets/webdevel.html and enter the following commands: document.onmousedown=new function(){return true;}; document.oncontextmenu=new function(){return true;}; I think web pages should never be allowed to do this...
Comment 12•22 years ago
|
||
Isn't this a dupe of bug 86193? I mean 86193 is about context menu and this one is about text selection, but I'm for making 86193 a general bug to not allow pages to prevent either mouse button to not work as desired. I don't understand why left and right mouse button both need an own bug.
Comment 13•21 years ago
|
||
URL no longer works. Attached testcase blocks selecting the text and also blocks the context menu as a control. The context menu can be re-enabled by setting dom.event.contextmenu.enabled to false. No such pref currently exists for onselectstart or onmousedown.
Comment 14•21 years ago
|
||
*** Bug 174795 has been marked as a duplicate of this bug. ***
Comment 15•21 years ago
|
||
a page where the original bug here can be seen is http://www.sas-gmbh.com/impressum.php from bug 250067
Summary: Can't select text w/ mouse, and can't unselect after "Select All" → Can't select text w/ mouse, and can't unselect after "Select All": RFE: pref to prevent JS blocking text selection
Updated•21 years ago
|
Assignee: mjudge → selection
Status: REOPENED → NEW
QA Contact: pmac
Updated•16 years ago
|
Assignee: selection → nobody
QA Contact: selection
Updated•15 years ago
|
Comment 18•10 years ago
|
||
I think I have experienced this problem, too; and the solutions was adding this part into file */chrome/userContent.css: * { -moz-user-select: text !important; user-select: text !important; }
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•