You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/11/14 19:02:50 UTC

zeppelin git commit: [ZEPPELIN-1652] Fix cursor move on double click in markdown editor

Repository: zeppelin
Updated Branches:
  refs/heads/master f127237fb -> 44d359d54


[ZEPPELIN-1652] Fix cursor move on double click in markdown editor

### What is this PR for?
There is a bug that when you double click markdown editor, cursor moves to end of the line. This PR fixes it.

### What type of PR is it?
Bug Fix

### What is the Jira issue?
[ZEPPELIN-1652](https://issues.apache.org/jira/browse/ZEPPELIN-1652)

### How should this be tested?
1. Type `%md ### Hello Zeppelin`
2. Double click Hello in editor
3. See if Hello stay highlighted

### Screenshots (if appropriate)
**Before**
![nov-11-2016 12-04-44](https://cloud.githubusercontent.com/assets/8503346/20213106/1a8f6f90-a807-11e6-8e30-8087db6ae97a.gif)

**After**
![nov-11-2016 12-03-14](https://cloud.githubusercontent.com/assets/8503346/20213062/de4c75aa-a806-11e6-83ab-c917f41e5ed4.gif)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Mina Lee <mi...@apache.org>

Closes #1622 from minahlee/ZEPPELIN-1652 and squashes the following commits:

a944dcc [Mina Lee] Fix cursor move on double click in markdown editor bug


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/44d359d5
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/44d359d5
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/44d359d5

Branch: refs/heads/master
Commit: 44d359d540b19aa0e16c5e5cdef4742e027d03a0
Parents: f127237
Author: Mina Lee <mi...@apache.org>
Authored: Fri Nov 11 11:55:41 2016 +0100
Committer: Lee moon soo <mo...@apache.org>
Committed: Mon Nov 14 11:02:47 2016 -0800

----------------------------------------------------------------------
 zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/44d359d5/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 d97f317..efcd0d1 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -1850,7 +1850,8 @@
     });
 
     $scope.$on('doubleClickParagraph', function(event, paragraphId) {
-      if ($scope.paragraph.id === paragraphId && editorSetting.editOnDblClick) {
+      if ($scope.paragraph.id === paragraphId && $scope.paragraph.config.editorHide &&
+          editorSetting.editOnDblClick) {
         var deferred = $q.defer();
         openEditorAndCloseTable();
         $timeout(