MDL-68223 assign: Fix selection of comment text.
This commit is contained in:
+7
-1
@@ -4381,16 +4381,22 @@ EDITOR.prototype = {
|
||||
* @method edit_move
|
||||
*/
|
||||
edit_move: function(e) {
|
||||
e.preventDefault();
|
||||
var bounds = this.get_canvas_bounds(),
|
||||
canvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
clientpoint = new M.assignfeedback_editpdf.point(e.clientX + canvas.get('docScrollX'),
|
||||
e.clientY + canvas.get('docScrollY')),
|
||||
point = this.get_canvas_coordinates(clientpoint),
|
||||
activeelement = document.activeElement,
|
||||
diffX,
|
||||
diffY;
|
||||
|
||||
if (activeelement.type === 'textarea') {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
// Ignore events out of the canvas area.
|
||||
if (point.x < 0 || point.x > bounds.width || point.y < 0 || point.y > bounds.height) {
|
||||
return;
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+7
-1
@@ -4381,16 +4381,22 @@ EDITOR.prototype = {
|
||||
* @method edit_move
|
||||
*/
|
||||
edit_move: function(e) {
|
||||
e.preventDefault();
|
||||
var bounds = this.get_canvas_bounds(),
|
||||
canvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
clientpoint = new M.assignfeedback_editpdf.point(e.clientX + canvas.get('docScrollX'),
|
||||
e.clientY + canvas.get('docScrollY')),
|
||||
point = this.get_canvas_coordinates(clientpoint),
|
||||
activeelement = document.activeElement,
|
||||
diffX,
|
||||
diffY;
|
||||
|
||||
if (activeelement.type === 'textarea') {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
// Ignore events out of the canvas area.
|
||||
if (point.x < 0 || point.x > bounds.width || point.y < 0 || point.y > bounds.height) {
|
||||
return;
|
||||
|
||||
+7
-1
@@ -1084,16 +1084,22 @@ EDITOR.prototype = {
|
||||
* @method edit_move
|
||||
*/
|
||||
edit_move: function(e) {
|
||||
e.preventDefault();
|
||||
var bounds = this.get_canvas_bounds(),
|
||||
canvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
clientpoint = new M.assignfeedback_editpdf.point(e.clientX + canvas.get('docScrollX'),
|
||||
e.clientY + canvas.get('docScrollY')),
|
||||
point = this.get_canvas_coordinates(clientpoint),
|
||||
activeelement = document.activeElement,
|
||||
diffX,
|
||||
diffY;
|
||||
|
||||
if (activeelement.type === 'textarea') {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
// Ignore events out of the canvas area.
|
||||
if (point.x < 0 || point.x > bounds.width || point.y < 0 || point.y > bounds.height) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user