I discovered that, for the grace notes, the ties are not considered.
The grace notes only steal time from the first note.
Listen to the mordent here:
!NoteWorthyComposerClip(2.5,Single)
|Clef|Type:Treble|OctaveShift:Octave Up
|TimeSig|Signature:2/4
|Note|Dur:16th,Triplet=First,Slur|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Triplet,Slur|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet=End,Slur|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:16th,Triplet=First,Slur|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Triplet,Slur|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet=End,Slur|Pos:2|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:16th|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam
|Rest|Dur:16th
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
|Note|Dur:16th|Pos:5|Opts:Stem=Down,Beam=First
|Rest|Dur:16th
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam
|Note|Dur:8th,Grace,Slur|Pos:2|Opts:Stem=Up,Slur=Upward|Visibility:Never
|Note|Dur:8th,Grace,Slur|Pos:3|Opts:Stem=Up,Slur=Upward|Visibility:Never
|Note|Dur:16th|Pos:2^|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:8th|Pos:2|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Dotted|Pos:0|Opts:Stem=Down,Beam=End
|Rest|Dur:16th
|Note|Dur:8th|Pos:-1
|Bar
!NoteWorthyComposerClip-End
I think it shouldn't be so.