Moving Anchoring Text to Anchored Object Crashes InDesign
Given a Text instance (source
) that contains an anchored object (U+FFFC marker), the command source.move(…)
crashes InDesign if the destination (TextFrame, Text, InsertionPoint…) is itself an anchored object (or inside it).
Code:
// Tested in ID CS6 and CC
// (see animation)
const BEG = LocationOptions.AT_BEGINNING;
var TFS = app.activeDocument.textFrames;
source = TFS.itemByName('source').texts[0]; // Text: contains the anchor
host = TFS.itemByName('host'); // TextFrame: 'host' frame
dest = host.textFrames.itemByName('dest'); // TextFrame: 'dest' frame
source.move(BEG,dest); // --> ID crash
//source.move(BEG,host); // WOULD BE OK
//source.duplicate(BEG,dest); // WOULD BE OK
-
Uwe Laubender commented
Thanks for reporting that bug.
FWIW: Here the thread at the InDesign User Forum where the issue came up:
How to get coordinates of table column or cell
Phil28637952i5ng, Apr 19, 2023
https://community.adobe.com/t5/indesign-discussions/how-to-get-coordinates-of-table-column-or-cell/td-p/13737665Three replies in the same thread by Marc Autret:
https://community.adobe.com/t5/indesign-discussions/how-to-get-coordinates-of-table-column-or-cell/m-p/13847453#M529464A test InDesign document with the named text frames is attached:
Text.move()-could-CRASH-InDesign.inddPS: Had to rename the InDesign document so that this forum allows to attach it:
Text.move()-could-CRASH-InDesign.indd.txtRegards,
Uwe Laubender
( Adobe Community Expert ) -
Uwe Laubender commented
Thanks for reporting that bug.
FWIW: Here the thread at the InDesign User Forum where the issue came up:
How to get coordinates of table column or cell
Phil28637952i5ng, Apr 19, 2023
https://community.adobe.com/t5/indesign-discussions/how-to-get-coordinates-of-table-column-or-cell/td-p/13737665Three replies in the same thread by Marc Autret:
https://community.adobe.com/t5/indesign-discussions/how-to-get-coordinates-of-table-column-or-cell/m-p/13847453#M529464A test InDesign document with the named text frames is attached:
Text.move()-could-CRASH-InDesign.inddRegards,
Uwe Laubender
( Adobe Community Expert )