Repository: incubator-zeppelin Updated Branches: refs/heads/master 8fdaaba94 -> 1cd08ab75
ZEPPELIN-547: Cannot select output of the paragraph ### What is this PR for? Cannot select error/output of the paragraph. Whenever there is a click on output the focus is set to editor. ### What type of PR is it? [Bug Fix] ### Todos * [x] - keep scope for mouse drag, doulble/multiple clicks ### Is there a relevant Jira issue? [ZEPPELIN-547](https://issues.apache.org/jira/browse/ZEPPELIN-547) ### How should this be tested? - Try single click on output, focus should be set to editor. - but if there is a mouse drag or double/triple click on output, it should select output. ### Screenshots (if appropriate) Single click, double click, triple click  Author: Prabhjyot Singh <[email protected]> Author: Prabhjyot <[email protected]> Author: Lee moon soo <[email protected]> Closes #585 from prabhjyotsingh/ZEPPELIN-547 and squashes the following commits: ba6cc38 [Prabhjyot Singh] reverting notebook.controller.js changes 9ae6155 [Prabhjyot] Merge pull request #1 from Leemoonsoo/ZEPPELIN-547 daf4ed7 [Lee moon soo] Another way of handling ZEPPELIN-547 9a03cd8 [Prabhjyot Singh] keep scope for mouse drag, doulble/multiple clicks Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/1cd08ab7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/1cd08ab7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/1cd08ab7 Branch: refs/heads/master Commit: 1cd08ab7571fb55dfe83c464779b659ec9c200a3 Parents: 8fdaaba Author: Prabhjyot Singh <[email protected]> Authored: Fri Jan 1 11:43:22 2016 +0530 Committer: Lee moon soo <[email protected]> Committed: Fri Jan 1 19:10:16 2016 -0800 ---------------------------------------------------------------------- zeppelin-web/src/app/notebook/notebook.controller.js | 1 - zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/1cd08ab7/zeppelin-web/src/app/notebook/notebook.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js index 9030a49..e10d725 100644 --- a/zeppelin-web/src/app/notebook/notebook.controller.js +++ b/zeppelin-web/src/app/notebook/notebook.controller.js @@ -107,7 +107,6 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', // register mouseevent handler for focus paragraph document.addEventListener('click', $scope.focusParagraphOnClick); - $scope.keyboardShortcut = function(keyEvent) { // handle keyevent if (!$scope.viewOnly) { http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/1cd08ab7/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 280ef6e..7a92cd0 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -841,9 +841,8 @@ angular.module('zeppelinWebApp') if ($scope.paragraph.id === paragraphId) { // focus editor if (!$scope.paragraph.config.editorHide) { - $scope.editor.focus(); - if (!mouseEvent) { + $scope.editor.focus(); // move cursor to the first row (or the last row) var row; if (cursorPos >= 0) {
