@@ -9,13 +9,6 ContextMenu.prototype = { | |||
|
9 | 9 | this.url = url; |
|
10 | 10 | this.createMenu(); |
|
11 | 11 | |
|
12 | // prevent text selection in the issue list | |
|
13 | var tables = $$('table.issues'); | |
|
14 | for (i=0; i<tables.length; i++) { | |
|
15 | tables[i].onselectstart = function () { return false; } // ie | |
|
16 | tables[i].onmousedown = function () { return false; } // mozilla | |
|
17 | } | |
|
18 | ||
|
19 | 12 | if (!observingContextMenuClick) { |
|
20 | 13 | Event.observe(document, 'click', this.Click.bindAsEventListener(this)); |
|
21 | 14 | Event.observe(document, (window.opera ? 'click' : 'contextmenu'), this.RightClick.bindAsEventListener(this)); |
@@ -167,6 +160,7 ContextMenu.prototype = { | |||
|
167 | 160 | addSelection: function(tr) { |
|
168 | 161 | tr.addClassName('context-menu-selection'); |
|
169 | 162 | this.checkSelectionBox(tr, true); |
|
163 | this.clearDocumentSelection(); | |
|
170 | 164 | }, |
|
171 | 165 | |
|
172 | 166 | toggleSelection: function(tr) { |
@@ -196,6 +190,14 ContextMenu.prototype = { | |||
|
196 | 190 | |
|
197 | 191 | isSelected: function(tr) { |
|
198 | 192 | return Element.hasClassName(tr, 'context-menu-selection'); |
|
193 | }, | |
|
194 | ||
|
195 | clearDocumentSelection: function() { | |
|
196 | if (document.selection) { | |
|
197 | document.selection.clear(); // IE | |
|
198 | } else { | |
|
199 | window.getSelection().removeAllRanges(); | |
|
200 | } | |
|
199 | 201 | } |
|
200 | 202 | } |
|
201 | 203 |
General Comments 0
You need to be logged in to leave comments.
Login now