SunShun created ZEPPELIN-5717:
---------------------------------

             Summary: Fix incorrect editor value gotten by Runner
                 Key: ZEPPELIN-5717
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-5717
             Project: Zeppelin
          Issue Type: Bug
    Affects Versions: 0.10.1, 0.10.0, 0.9.0, 0.11.0
            Reporter: SunShun
            Assignee: SunShun
             Fix For: 0.11.0
         Attachments: image-2022-04-13-14-07-07-135.png, 
image-2022-04-13-14-18-56-519.png, image-2022-04-13-14-20-39-149.png, 
image-2022-04-13-14-26-39-640.png

When user runs paragraph with input box, under the *runner* role, once they 
press 'enter' key, the paragraph content will be overwritten and lost (become 
empty).

!image-2022-04-13-14-07-07-135.png|width=443,height=176!

!image-2022-04-13-14-18-56-519.png|width=374,height=160!

I am trying to debug, and find that, in such case, the value of selected 
paragraph is blank, and it will be passed to backend to run via websocket, and 
backend will persist it as right now runner are also allowed to save 
paragraph(perhaps they also need to change parameters)

!image-2022-04-13-14-20-39-149.png|width=485,height=257!

Then with more debugging, found that the value of "paragraph" is incorrect.

!image-2022-04-13-14-26-39-640.png|width=507,height=63!

Because for user under runner role, even through the editor is hidden, the 
*$scope.editor* object is still not empty and the *$scope.editor.getValue()* 
function may return a null value.

So there should be one more condition to judge: if user cannot view editor, 
it's also expected to get editor value from *$scope.paragraph.text* as well.

I already fix this issue and will make the commit on git soon.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to