diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 07771d3b1..fe31d4295 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -334,7 +334,8 @@ "txtExpandSort": "The data next to the selection will not be sorted. Do you want to expand the selection to include the adjacent data or continue with sorting the currently selected cells only?", "txtNotUrl": "This field should be a URL in the format \"http://www.example.com\"", "txtSorting": "Sorting", - "txtSortSelected": "Sort selected" + "txtSortSelected": "Sort selected", + "textSelectedRange": "Selected Range" }, "Edit": { "notcriticalErrorTitle": "Warning", diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx index 3d026852b..683964fc1 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/add/AddLink.jsx @@ -87,7 +87,10 @@ class AddLinkController extends Component { display = args.sheet + '!' + args.url; } - link.asc_setText(args.text == null ? null : !!args.text ? args.text : display); + if(this.displayText !== 'locked') { + link.asc_setText(args.text == null ? null : !!args.text ? args.text : display); + } + link.asc_setTooltip(args.tooltip); api.asc_insertHyperlink(link); diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx index 75fbe135d..3882bcf8f 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx @@ -61,6 +61,7 @@ const AddLinkView = props => { let displayText = props.displayText; const displayDisabled = displayText === 'locked'; displayText = displayDisabled ? _t.textSelectedRange : displayText; + const [stateDisplayText, setDisplayText] = useState(displayText); const [stateAutoUpdate, setAutoUpdate] = useState(true); const [screenTip, setScreenTip] = useState(''); @@ -89,7 +90,7 @@ const AddLinkView = props => { value={link} onChange={(event) => { setLink(event.target.value); - if((!stateDisplayText || stateDisplayText === link) && stateAutoUpdate) setDisplayText(event.target.value); + if((!stateDisplayText || stateDisplayText === link) && stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value); }} className={isIos ? 'list-input-right' : ''} />