From 2e9c854a2419216d63263ffdd113cafbe516b284 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Thu, 13 Sep 2018 14:52:18 +0200 Subject: [PATCH 01/77] Tests: Added manual test. --- tests/plugins/dialog/manual/inputfocus.html | 12 +++++++ tests/plugins/dialog/manual/inputfocus.md | 37 +++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 tests/plugins/dialog/manual/inputfocus.html create mode 100644 tests/plugins/dialog/manual/inputfocus.md diff --git a/tests/plugins/dialog/manual/inputfocus.html b/tests/plugins/dialog/manual/inputfocus.html new file mode 100644 index 00000000000..e2ab1a44332 --- /dev/null +++ b/tests/plugins/dialog/manual/inputfocus.html @@ -0,0 +1,12 @@ + +
+ +
+ + diff --git a/tests/plugins/dialog/manual/inputfocus.md b/tests/plugins/dialog/manual/inputfocus.md new file mode 100644 index 00000000000..5b47992e264 --- /dev/null +++ b/tests/plugins/dialog/manual/inputfocus.md @@ -0,0 +1,37 @@ +@bender-tags: 2395, bug, 4.10.2 +@bender-ui: collapsed +@bender-ckeditor-plugins: wysiwygarea, toolbar, link + +1. Scroll down until editor is visible. +1. Press link button. + +## Things to check: + +### Touch devices: + +- Play around focusing and blurring inputs, zooming and scrolling page. + +#### Expected: + +- When opening dialog or focusing input caret page should be scrolled in a way caret is visible. + +#### Unexpected + +- Caret is outside of current viewport. + +### Desktop computers: + +- Resize browser window. +- Resize dialog window. +- Drag dialog window. +- Close and reopen dialog. + +#### Expected: + +- When dialog is shown scrollbars are invisible. +- When resizing browser window dialog is still horizontally and vertically centered. +- When window too small to fit dialog window scrollbars should appear allowing to scroll dialog. +- Dialog window can be resized and dragged around. +- When closing and reopening dialog it has same size and position as it had before when it was closed. + +Note: When you reposition dialog it won't be centered when resizing browser window. From 5a03d34a2b22ef54315cde491b97e05855f2dd63 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Thu, 13 Sep 2018 15:16:23 +0200 Subject: [PATCH 02/77] Fixed: focusing dialogs input moves scrolls input outside of viewport. Reworked how dialog is styled. Dialog wrapper now has fixed position with width and height set to 100%. When dialog is shown body gets class with 'overflow:hidden', and right padding calculated from width of scrollbar. In all browsers dialog is centered with only CSS. In IE it is centered via absolute position calculated by script. When dialog is is dragged it becomes absolute positioned. --- plugins/dialog/plugin.js | 89 ++++++++++++++++++++++++++++--------- skins/moono-lisa/dialog.css | 24 +++++++--- 2 files changed, 87 insertions(+), 26 deletions(-) diff --git a/plugins/dialog/plugin.js b/plugins/dialog/plugin.js index c2d034b5f49..2d30f6548ce 100644 --- a/plugins/dialog/plugin.js +++ b/plugins/dialog/plugin.js @@ -135,7 +135,7 @@ CKEDITOR.DIALOG_STATE_BUSY = 2; input && input.removeAttribute( 'aria-invalid' ); } - var templateSource = '