mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Enable focus first paragraph on note reload
This commit is contained in:
parent
c5667066a2
commit
4ffc4466e6
3 changed files with 3 additions and 2 deletions
|
|
@ -461,6 +461,7 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
|
|||
waitForParagraph(1, "FINISHED");
|
||||
|
||||
action.doubleClick(driver.findElement(By.xpath(getParagraphXPath(1)))).perform();
|
||||
ZeppelinITUtils.sleep(1000, false);
|
||||
collector.checkThat("Markdown editor is shown after double click ",
|
||||
driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.editorHide')]")).isDisplayed(),
|
||||
CoreMatchers.equalTo(true));
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@
|
|||
} else {
|
||||
$scope.viewOnly = $scope.note.config.looknfeel === 'report' ? true : false;
|
||||
}
|
||||
//$scope.note.paragraphs[0].focus = true;
|
||||
$scope.note.paragraphs[0].focus = true;
|
||||
$rootScope.$broadcast('setLookAndFeel', $scope.note.config.looknfeel);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@
|
|||
// or the first 30 characters of the paragraph have been modified
|
||||
// or cursor position is at beginning of second line.(in case user hit enter after typing %magic)
|
||||
if ((typeof pos === 'undefined') || (pos.row === 0 && pos.column < 30) ||
|
||||
(pos.row === 1 && pos.column === 0) || pastePercentSign) {
|
||||
(pos.row === 1 && pos.column === 0) || pastePercentSign || $scope.paragraphFocused) {
|
||||
// If paragraph loading, use config value if exists
|
||||
if ((typeof pos === 'undefined') && $scope.paragraph.config.editorMode) {
|
||||
session.setMode($scope.paragraph.config.editorMode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue