From 498013d6d3641e9c9b6321562acc91975217139c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 18 Sep 2019 11:58:40 +0300 Subject: [PATCH] [DE] Bug 41231 --- apps/documenteditor/main/app/view/BookmarksDialog.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/view/BookmarksDialog.js b/apps/documenteditor/main/app/view/BookmarksDialog.js index 685ac1ea4..2edb627d7 100644 --- a/apps/documenteditor/main/app/view/BookmarksDialog.js +++ b/apps/documenteditor/main/app/view/BookmarksDialog.js @@ -136,9 +136,10 @@ define([ value : '', maxLength: 40, validation : function(value) { - var check = me.props.asc_CheckNewBookmarkName(value); - me.btnAdd.setDisabled(!check); - return (check || _.isEmpty(value)) ? true : me.txtInvalidName; + var check = me.props.asc_CheckNewBookmarkName(value), + exist = me.props.asc_HaveBookmark(value); + me.btnAdd.setDisabled(!check && !exist); + return (check || _.isEmpty(value) || exist) ? true : me.txtInvalidName; } }).on ('changing', function (input, value) { var exist = me.props.asc_HaveBookmark(value); @@ -314,7 +315,10 @@ define([ gotoBookmark: function(btn, eOpts){ var rec = this.bookmarksList.getSelectedRec(); - rec && this.props.asc_SelectBookmark(rec.get('value')); + if (rec) + this.props.asc_SelectBookmark(rec.get('value')); + else if (this.txtName.getValue()!=='') + this.props.asc_SelectBookmark(this.txtName.getValue()); }, addBookmark: function(btn, eOpts){