From 5bda066caa88bace064bdf6a2ab471c56e07f4c4 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Fri, 3 May 2019 11:18:49 +0800 Subject: [PATCH] MDL-65484 assign: Scrolling overflow CSS Use relatively positioned elements, not absolutely positioned to prevent elements being visible when they are scrolled outside the containing drawing region. --- ...dle-assignfeedback_editpdf-editor-debug.js | Bin 155747 -> 155830 bytes ...oodle-assignfeedback_editpdf-editor-min.js | Bin 54250 -> 54250 bytes .../moodle-assignfeedback_editpdf-editor.js | Bin 155747 -> 155830 bytes .../yui/src/editor/js/annotationstamp.js | 3 ++- .../editpdf/yui/src/editor/js/comment.js | 2 +- 5 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js index 0d6a4485a0bd8aa697b833ba63c9608d45586510..ee82675f460f6b78f620af9a6a00efcd80317d3f 100644 GIT binary patch delta 109 zcmaESfOFeH&J8!$^Xuy?c%~_oWTY0SDkK)APA{-y5>wRy2~;Yi7AGebq=ML)MGD2q zMfo{73d#9-C5f4NsYQB|FRV9aFG|fxEXgd}%(X$ifD_6|RiB)1F3}#Oz_>j~fl1H- E0O}7X;Q#;t delta 48 zcmV-00MGxn!3pEQ39#9(mrNl62$SHpoU_odv~LMvVsme7b#!GXm$4uL7>A`G0k@?f G0uewzE)=-{ diff --git a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js index 4b467b2d3441714f1b26f88a5c4f4be98f6b17f1..7a85b4555f58d633bc656df3ef0f48750e5e2439 100644 GIT binary patch delta 35 kcmaF0ocYyq<_(8T*o#tg5=%16HlH+M(SmcX#EF#x0316H82|tP delta 31 ncmaF0ocYyq<_(8TChJ&4Zk9IPq{*I`RGgnvTC({{oLDIU;Mxst diff --git a/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js b/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor.js index 0d6a4485a0bd8aa697b833ba63c9608d45586510..ee82675f460f6b78f620af9a6a00efcd80317d3f 100644 GIT binary patch delta 109 zcmaESfOFeH&J8!$^Xuy?c%~_oWTY0SDkK)APA{-y5>wRy2~;Yi7AGebq=ML)MGD2q zMfo{73d#9-C5f4NsYQB|FRV9aFG|fxEXgd}%(X$ifD_6|RiB)1F3}#Oz_>j~fl1H- E0O}7X;Q#;t delta 48 zcmV-00MGxn!3pEQ39#9(mrNl62$SHpoU_odv~LMvVsme7b#!GXm$4uL7>A`G0k@?f G0uewzE)=-{ diff --git a/mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js b/mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js index 88161a66643..27a1cbd28ff 100644 --- a/mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js +++ b/mod/assign/feedback/editpdf/yui/src/editor/js/annotationstamp.js @@ -49,8 +49,9 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, { position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y)); node = Y.Node.create('
'); + // If these are absolutely positioned, they escape their scroll container. node.setStyles({ - 'position': 'absolute', + 'position': 'relative', 'display': 'inline-block', 'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')', 'width': (this.endx - this.x), diff --git a/mod/assign/feedback/editpdf/yui/src/editor/js/comment.js b/mod/assign/feedback/editpdf/yui/src/editor/js/comment.js index 5fa232c4759..75c2dcba401 100644 --- a/mod/assign/feedback/editpdf/yui/src/editor/js/comment.js +++ b/mod/assign/feedback/editpdf/yui/src/editor/js/comment.js @@ -204,7 +204,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) { }); drawingregion.append(container); - container.setStyle('position', 'absolute'); + container.setStyle('position', 'relative'); container.setX(position.x); container.setY(position.y); drawable.store_position(container, position.x, position.y); -- 2.43.0