Repository: zeppelin Updated Branches: refs/heads/master 4beeae844 -> a1c5e99a5
[ZEPPELIN-2131] Restrict `shift + arrow` key in focused cell ### What is this PR for? Selection of text in cell by Shift-Arrow should be restricted to focussed cell. ### What type of PR is it? [Improvement] ### Todos DONE ### What is the Jira issue? [ZEPPELIN-2131](https://issues.apache.org/jira/browse/ZEPPELIN-2131) ### How should this be tested? 1. Create multiple paragraphs. 2. Move cursors using `shift + arrow` (up, down) 3. Should keep focus on the current paragraph. ### Screenshots (if appropriate) #### Before  #### After  ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <[email protected]> Closes #2361 from 1ambda/ZEPPELIN-2131/restrict-shift-arrow-in-cell and squashes the following commits: 4d401a5 [1ambda] fix: Restrict shift + arrow in current cell Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a1c5e99a Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a1c5e99a Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a1c5e99a Branch: refs/heads/master Commit: a1c5e99a55fcfd60ab887a165b0b91d1d5badf35 Parents: 4beeae8 Author: 1ambda <[email protected]> Authored: Mon May 22 14:33:55 2017 +0900 Committer: Lee moon soo <[email protected]> Committed: Thu May 25 15:37:20 2017 +0900 ---------------------------------------------------------------------- .../src/app/notebook/paragraph/paragraph.controller.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a1c5e99a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 3d75676..fd21467 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -818,20 +818,16 @@ function ParagraphCtrl ($scope, $rootScope, $route, $window, $routeParams, $loca switch (keyCode) { case 38: - keyBindingEditorFocusAction(ROW_UP) + if (!e.shiftKey) { keyBindingEditorFocusAction(ROW_UP) } break case 80: - if (e.ctrlKey && !e.altKey) { - keyBindingEditorFocusAction(ROW_UP) - } + if (e.ctrlKey && !e.altKey) { keyBindingEditorFocusAction(ROW_UP) } break case 40: - keyBindingEditorFocusAction(ROW_DOWN) + if (!e.shiftKey) { keyBindingEditorFocusAction(ROW_DOWN) } break case 78: - if (e.ctrlKey && !e.altKey) { - keyBindingEditorFocusAction(ROW_DOWN) - } + if (e.ctrlKey && !e.altKey) { keyBindingEditorFocusAction(ROW_DOWN) } break } }
