New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOTFIX : ZEPPELIN-1932] paragraph blur error #1879
[HOTFIX : ZEPPELIN-1932] paragraph blur error #1879
Conversation
Tested, LGTM |
@cloverhearts I'd like to test this. could you resolve some conflict file? |
@soralee rebase is done. |
@cloverhearts Thank you 👍 |
Tested and it works well 👍 |
Merge if there is no more discussion |
@cloverhearts Can you also look into https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js#L764 this line? I see another error related to editor. How to reproduce
|
@minahlee Okay, I will take look. |
fixed |
@cloverhearts update looks good to me. |
LGTM |
### What is this PR for? When one or more hidden editors are present, clicking on the editor will cause a blur error. This means that when a paragraph is hidden through ng-if, Caused by calling the blur method in the absence of an editor object. ### What type of PR is it? Hot Fix ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1932 ### How should this be tested? 1. create paragraph and open debug console. 2. enable hide paragraph. 3. page refresh 4. click to anywhere paragraph. ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: cloverhearts <cloverheartsdev@gmail.com> Closes #1879 from cloverhearts/hotfix/paragraphOnfocusEvent and squashes the following commits: 7071638 [cloverhearts] fix show title and paragraph context issue 8f4d0bf [cloverhearts] fixed readonly event error 5ecfabb [cloverhearts] check editor object is undeifned. (cherry picked from commit 2b0e2a4) Signed-off-by: Mina Lee <minalee@apache.org>
### What is this PR for? #1879 check if `$scope.editor` is null on `focusParagraph` message, and if it is, just return without handling focus/blur. Instead of doing null check in the beginning of `$scope.on(focusParagraph)`, I made null check to be scoped only to `$scope.editor`'s method invocation. FYI, when I say focus/blur, it means paragraph focus. Focused paragraph has different css style from blurred paragraph. ### What type of PR is it? Bug Fix | Hot Fix ### What is the Jira issue? [ZEPPELIN-2033](https://issues.apache.org/jira/browse/ZEPPELIN-2033) ### How should this be tested? Go to `Zeppelin Tutorial/Matplotlib (Python • PySpark)` notebook and see: - if first paragraph is blurred, when you click second paragraph. - if first paragraph is not run when you run second paragraph with shift + enter. In current master, first editor is not blurred even if you click second paragraph, which makes both first and second paragraph to be focused. This will make both paragraphs to be run. - if it is focused when you click third paragraph whose editor is hidden. In current master, it won't work. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Mina Lee <minalee@apache.org> Closes #1963 from minahlee/ZEPPELIN-2033 and squashes the following commits: 3bf07ca [Mina Lee] Handle focus/blur of paragraph with hidden editor
### What is this PR for? #1879 check if `$scope.editor` is null on `focusParagraph` message, and if it is, just return without handling focus/blur. Instead of doing null check in the beginning of `$scope.on(focusParagraph)`, I made null check to be scoped only to `$scope.editor`'s method invocation. FYI, when I say focus/blur, it means paragraph focus. Focused paragraph has different css style from blurred paragraph. ### What type of PR is it? Bug Fix | Hot Fix ### What is the Jira issue? [ZEPPELIN-2033](https://issues.apache.org/jira/browse/ZEPPELIN-2033) ### How should this be tested? Go to `Zeppelin Tutorial/Matplotlib (Python • PySpark)` notebook and see: - if first paragraph is blurred, when you click second paragraph. - if first paragraph is not run when you run second paragraph with shift + enter. In current master, first editor is not blurred even if you click second paragraph, which makes both first and second paragraph to be focused. This will make both paragraphs to be run. - if it is focused when you click third paragraph whose editor is hidden. In current master, it won't work. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Mina Lee <minalee@apache.org> Closes #1963 from minahlee/ZEPPELIN-2033 and squashes the following commits: 3bf07ca [Mina Lee] Handle focus/blur of paragraph with hidden editor (cherry picked from commit fe11b32) Signed-off-by: Mina Lee <minalee@apache.org>
What is this PR for?
When one or more hidden editors are present, clicking on the editor will cause a blur error.
This means that when a paragraph is hidden through ng-if,
Caused by calling the blur method in the absence of an editor object.
What type of PR is it?
Hot Fix
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1932
How should this be tested?
Questions: