GitHub user minahlee opened a pull request: https://github.com/apache/zeppelin/pull/1963
[ZEPPELIN-2033] 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 You can merge this pull request into a Git repository by running: $ git pull https://github.com/minahlee/zeppelin ZEPPELIN-2033 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/1963.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1963 ---- commit 3bf07ca5e915a6ddfa680f965e69ccac53de9a0d Author: Mina Lee <mina...@apache.org> Date: 2017-01-31T10:02:15Z Handle focus/blur of paragraph with hidden editor ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---