Problem with EditControl tabs related to cursor positioning (again)

 Earlier this year, I reported a problem with tabs and cursor positioning.

See this link:

https://www.syncfusion.com/forums/150936/problems-with-tabs-in-editcontrol-related-to-cursor-position-and-highlighting

The fix for this was in the March release, I believe. At that time, I thought this issue was corrected.

Later on, I reported another issue with blank text due to GlyphIndices error.
After doing a remote session with your developers and ours, problem was identified and resolved with a patch.
See link:


However, we have just discovered that the original tab issue has returned.
Can you verify that the fix in the March release is still present in the patch for incident 273074 ?

Thanks a lot.

40 Replies

UN Unknown Syncfusion Team June 8, 2020 06:23 AM UTC

Hi Steve, 

Thanks for contacting Syncfusion support. 

We have checked your query “Fix provided in Forum 150936 is not included in patch reported incident ” and we are able to reproduce the reported issue. The fix for this issue will be included in patch which will be provided by June 11, 2020. We appreciate your patience until then. 

Regards, 
Niranjan Kumar Gopalan 



UN Unknown Syncfusion Team June 12, 2020 10:22 AM UTC

Hi Steve, 
 
Sorry for the inconvenience caused. 
 
Due to some complexities faced while fixing the issue, the patch for reported issue will be provided on June 15, 2020. We appreciate your patience until then. 
 
Regards, 
Niranjan Kumar Gopalan 



UN Unknown Syncfusion Team June 15, 2020 09:30 AM UTC

Hi Steve   
   
Thanks for your patience.  
  
The reported issue has been fixed and included in the patch which can be download from the below links.  
   
Recommended approach - exe will perform automatic configuration.   
   
Please find the patch setup from below location:   
   
Patch link :   
Please find the patch assemblies alone from below location:   
   
Assemblies Link:   
  
Nuget link:    
  
   
Assembly Version: 18.1.0.42   
   
Installation Directions:   
This patch should replace the files "Syncfusion.Edit.WPF” under the following folder.   
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]   
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.1.0.42\precompiledassemblies\18.1.0.42\4.6   
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.   
   
   
Disclaimer:   
Please note that we have created this patch for version 18.1.0.42 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.   
   
Regards,   
Niranjan Kumar Gopalan   




SM Steve McWilliams June 15, 2020 07:01 PM UTC

Unfortunately, it seems that problem is not resolved.

I've attached a simple demo solution including this new DLL from patch.

Click the Populate button to load a string with tabs in it.
Try to place cursor between tab-separated characters to insert some new string.
Cursor jumps over past the place where you want it to be.

Attachment: EditTest_e272aca.zip


UN Unknown Syncfusion Team June 16, 2020 08:41 AM UTC

Hi Steve, 

Thanks for your update. 

We have checked your query “Clicking in tab space area does not place cursor in clicked place in EditControl ” and we are unable to reproduce the issue. We have repeated the procedure in provided sample and the indented operation works fine. Please refer the below sample which contains the assemblies used to test your query and video for same. 



Regards, 
Niranjan Kumar Gopalan 



SM Steve McWilliams June 16, 2020 03:45 PM UTC

After consulting more with the developer, it seems that the issue is that we don't want to replace \t with 4 spaces.
She set TabSpaces=0 in xaml deliberately.

She wants to retain the "\t" in the Contents string and manipulate it in code-behind later.
Is there a way to keep "\t" and not remove it or replace it with spaces ?

Thanks for your help.


UN Unknown Syncfusion Team June 17, 2020 11:29 AM UTC

Hi Steve 

Thanks for your update. 

We have checked your query “Special character like "\t" should be available in text when EditControl is assigned to string instead of replaced by spaces” and logged it as defect. The fix for this issue will be included in weekly NuGet release which will roll out by first week of July, 2020. Can you wait until then ? Otherwise if you are using Syncfusion release version we will provide you patch in that version on July 2, 2020. Please refer the below feedback for same. 
                                                                                                                                                                              

Regards, 
Niranjan Kumar Gopalan 





MM Mageshyadav M Syncfusion Team July 10, 2020 06:50 AM UTC

Hi Steve, 

Sorry for the inconvenience caused. 

We have not completed the fix reported due to breaking in other features hence it getting delayed. We are working on it in high priority and will deliver patch on or before July 16, 2020.  

Regards, 
Mageshyadav.M 



SM Steve McWilliams July 10, 2020 10:09 PM UTC

Ok, sorry. I just assumed fix was in the latest release already.
If our requested behavior changes require some XAML option to be set to be enabled, that's OK. We don't want to break EditControl for other users.

To further clarify the description of our problems:

  1. We need to keep TabSpace in xaml as 0, so when we tab in editor, EditControl will just insert a “\t” control character instead of a specified number of white spaces.
    This is because we have a parallel Hex editor which shows the text in hex characters. For "\t" we want to see hex 09, not have it expanded to 4 spaces.
  2. We need to have “\t” character work same as any other characters: that is, using backspace/delete/mouse cursor to click before or anywhere after the “\t” character should work correctly. Right now if you try to click at end of line with a “\t” character in text contents, the cursor appears somewhere before end of line and you can’t click anywhere after that cursor position.
  3. And right now, if you highlight chars in a row with a “\t” character, you will see characters in highlighted mode are not at their correct positions and only part of the line gets highlighted



UN Unknown Syncfusion Team July 13, 2020 09:36 AM UTC

Hi Steve, 

Thanks for your update. 

We have checked the problems that you have mentioned in your previous update and ensured that problems 2 and 3 are fixed and included in our latest version 18.2 and the delayed fix for problem 1 will be provided as patch in v 18.2 on July 16, 2020. We appreciate your patience until then. 

Regards, 
Niranjan Kumar Gopalan 



UN Unknown Syncfusion Team July 16, 2020 11:47 AM UTC

Hi Steve, 

Sorry for the inconvenience caused. 

Due to complexities faced while fixing the issue ,we will provide patch in your version 18.2 after completely testing the fix on July 17, 2020 (tomorrow). We appreciate your patience until then. 

Regards, 
Niranjan Kumar Gopalan 



UN Unknown Syncfusion Team July 17, 2020 07:03 AM UTC

Hi Steve   
   
Thanks for your patience.  
  
The reported issue has been fixed and included in the patch which can be download from the below links.  
   
Recommended approach - exe will perform automatic configuration.   
   
Please find the patch setup from below location:   
   
Patch link :   
Please find the patch assemblies alone from below location:   
   
Assemblies Link:   
  
Nuget link:    
  
   
Assembly Version: 18.2.0.44   
   
Installation Directions:   
This patch should replace the files "Syncfusion.Edit.WPF” under the following folder.   
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]   
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.2.0.44\precompiledassemblies\18.2.0.44\4.6   
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.   
   
   
Disclaimer:   
Please note that we have created this patch for version 18.2.0.44 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.   
   
Regards,   
Niranjan Kumar Gopalan   




SM Steve McWilliams July 20, 2020 01:48 PM UTC

We could not verify fix for issue due to error about oldValue.


I attached demo with new DLL included. App crashes when you click Populate button


Attachment: EditTest_e272aca_bb45b697.zip


UN Unknown Syncfusion Team July 21, 2020 11:28 AM UTC

Hi Steve, 

Thanks for your update. 

We have checked the attached sample and it can be resolved by assigning TabSpace property value greater than zero since it is used in VS TabKey behavior, in default mode it is returned as empty. Please do the mentioned changes and let us know if your query has been resolved. 

Regards, 
Niranjan Kumar Gopalan 
 



SM Steve McWilliams July 21, 2020 01:59 PM UTC

But if I change TabSpaces to 4 spaces, for example, I am back to the original problem where the tab character is replaced by 4 spaces.

I am confused as to what was done to address problem #1, which was the whole reason for the delay in the patch release.

Are we supposed to make some other changes ?


To further clarify the description of our problems:

  1. We need to keep TabSpace in xaml as 0, so when we tab in editor, EditControl will just insert a “\t” control character instead of a specified number of white spaces.
    This is because we have a parallel Hex editor which shows the text in hex characters. For "\t" we want to see hex 09, not have it expanded to 4 spaces



UN Unknown Syncfusion Team July 22, 2020 11:20 AM UTC

Hi Steve, 

Sorry for the inconvenience caused. 

We have checked your query “”When TabSpace is set to 0 and press tab key in SyntaxEditor , “\t” needs to be inserted “. When TabSpace property value is 0 , EditControl will prevent from implementing tab spaces so “\t” will not be inserted. Whereas when TabSpace value is greater than 0 and press tab key in SyntaxEditor, it will include number of tab spaces  in Editor and replace the spaces by “\t” when use the Text property of EditControl as shown below. This is the default behavior of VS TabKey too.  

Screenshot : 
  1. TabSpace value as 2:
 
  1. “\t” in Text property:
 

Regards, 
Niranjan Kumar Gopalan 
 



SM Steve McWilliams July 22, 2020 02:31 PM UTC

I see that clicking Tab key inserts \t char in Text property now, as you say.

But, we were hoping that clicking backspace or delete key once in that position could delete the \t char and  remove all the whitespace at once.
It's how basic TextEditor works.
 "a\tb" becomes "ab" after a backspace.

Right now, looks like backspace in  EditControl  removes the \t, but switches to 4 spaces and then removes one space, leaving 3 spaces.

If this is not possible somehow in EditControl, I guess we may have to use TextEditor or something else instead.




UN Unknown Syncfusion Team July 23, 2020 11:29 AM UTC

Hi Steve, 
 
Thanks for your update. 
 
Your requirement to remove the tab spaces similar to Notepad and other editors can be achieved by assigning TabKeyBehavior property value to Default. Currently there are issue in that behavior , so we are working on it and we will provide patch for this issue on August 5, 2020. We appreciate your patience until then. 
 
Note : When TabKeyBehavior value is default, you cannot place the cursor in between the spaces similar to NotePad. 
 
Regards, 
Niranjan Kumar Gopalan 
 



SM Steve McWilliams July 23, 2020 04:00 PM UTC

All right. I will wait till TabKeyBehavior=Default is fixed in next patch, so behavior can be same as in NotePad


UN Unknown Syncfusion Team July 24, 2020 04:33 AM UTC

Hi Steve, 

Thanks for your update. 

We will provide patch for the TabKeyBehavior property Default value issue on the promised date August 5, 2020. We appreciate your patience until then. 

Regards, 
Niranjan Kumar Gopalan 



UN Unknown Syncfusion Team August 5, 2020 12:42 PM UTC

Hi Steve   
   
Thanks for your patience.  
  
The reported issue has been fixed and included in the patch which can be download from the below links.  
   
Recommended approach - exe will perform automatic configuration.   
   
Please find the patch setup from below location:   
   
Patch link :   
   
Assemblies Link:   
  
Nuget link:    
  
   
Assembly Version: 18.2.0.44   
   
Installation Directions:   
This patch should replace the files "Syncfusion.Edit.Wpf” under the following folder.   
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]   
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.2.0.44\precompiledassemblies\18.2.0.44\4.6   
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.   
   
   
Disclaimer:   
Please note that we have created this patch for version 18.2.0.44 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.   
   
Regards,   
Niranjan Kumar Gopalan  




VR Vijayalakshmi Roopkumar Syncfusion Team August 5, 2020 02:33 PM UTC

Hi Steve    
    
Thanks for your patience.   
   
The reported issue has been fixed and included in the patch which can be download from the below links.   
    
Recommended approach - exe will perform automatic configuration.    
    
Please find the patch setup from below location:    
    
Patch link :    
 
 
Please find the patch assemblies alone from below location:    
    
Assemblies Link:    
 
   
  
   
    
Assembly Version: 18.2.0.44    
    
Installation Directions:    
This patch should replace the files "Syncfusion.Edit.Wpf” under the following folder.    
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]    
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.2.0.44\precompiledassemblies\18.2.0.44\4.6    
    
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.    
    
    
Disclaimer:    
Please note that we have created this patch for version 18.2.0.44 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.    
    
Regards,    
Vijayalakshmi VR 



SM Steve McWilliams August 5, 2020 10:10 PM UTC

I put new Edit.WPF.dll from 8/5/2020 patch into my solution and nothing seems to have changed, regarding using Delete or Backspace to remove \t (tab char).
Hitting Tab key inserts tab char correctly, but I was expecting backspace to then remove that tab char, as long as TabKeyBehavior was set to "Default" as you indicated.
Instead, it still just removes a space and leaves others in place where \t char was.
Please review attached solution to see if I have missed doing something necessary to make it work same as Notepad.

Thanks very much.

Attachment: EditTest_d9c5edbb.zip


UN Unknown Syncfusion Team August 6, 2020 06:48 AM UTC

Hi Steve, 

Thanks for your update. 

We have checked the reported query with the patch provided in our previous update but it works fine. Please refer the below sample with assemblies included (which contains the patch for EditControl) and working video for same and let us know if your require further assistance. 


Sample : https://www.syncfusion.com/downloads/support/forum/154958/ze/EditTest-334853237                               
 
Regards, 
Niranjan Kumar Gopalan 



SM Steve McWilliams August 6, 2020 11:45 PM UTC

I apologize. I must have done something wrong just sticking in the one DLL manually,
Once I ran the installer, the example solution worked for me also !

I will install the patch in my larger application tomorrow, but I have confidence it should work now.
Thank you for your help.


UN Unknown Syncfusion Team August 7, 2020 02:36 AM UTC

Hi Steve, 
 
Thanks for your update. 
 
We will wait to hear from you. 
 
Regards, 
Niranjan Kumar Gopalan 



SM Steve McWilliams August 12, 2020 09:57 PM UTC

We had a bit of trouble getting this to work in our application, but the demo solution worked correctly.
It took a bit of digging to find out what the difference was, but we have tracked it down to our use of Custom.Language.
We are using that to automatically highlight certain keywords in a different text color.

I attached another solution so you can see the issue.
If the Custom.Language stmt on line 47 on MainWindow.xaml.cs is commented out, everything works perfectly, (except text is all black).
If it is left in the blue text color appears, but the cursor positioning and text issues are still there.

If you think there could be a fix for this also, it would be appreciated. 
If you think it can't be done, we can take out this feature and live with it as is.

Attachment: EditControlTabBrokeByCustomLanguage_279e5dd0.zip


UN Unknown Syncfusion Team August 13, 2020 07:54 AM UTC

Hi Steve, 

Thanks for your update. 

We have checked and logged the reported query as defect "TabKeyBehavior is not working with Default value when DocumentLanguage is other than Text". We will provide patch for the reported issue on August  27, 2020. Please refer the below feedback and we appreciate your patience until then. 


Regards, 
Niranjan Kumar Gopalan 



SM Steve McWilliams August 13, 2020 03:06 PM UTC

Thanks very much for your help.
I will check back then


UN Unknown Syncfusion Team August 14, 2020 03:44 AM UTC

Hi Steve, 

Thanks for your update. 

We will let you know once reported issue is fixed and  patch is available. We appreciate your patience until then. 

Regards, 
Niranjan Kumar Gopalan 





UN Unknown Syncfusion Team August 27, 2020 12:26 PM UTC

Hi Steve, 

Sorry for the inconvenience caused. 

Due to complexities faced while fixing the reported issue we will provide patch tomorrow August 28, 2020. We appreciate your patience until then. 

Regards, 
Niranjan Kumar Gopalan 
 



UN Unknown Syncfusion Team August 28, 2020 08:15 AM UTC

Hi Steve 
   
Thanks for your patience.  
  
The reported  issue has been fixed and included in the patch which can be download from the below links.  
   
Recommended approach - exe will perform automatic configuration.   
   
Please find the patch setup from below location:   
   
Patch link :   
Please find the patch assemblies alone from below location:   
   
Assemblies Link:   
  
Nuget link:    
  
   
Assembly Version: 18.2.0.44   
   
Installation Directions:   
This patch should replace the files "Syncfusion.Edit.Wpf” under the following folder.   
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]   
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\18.2.0.44\precompiledassemblies\18.2.0.44\4.6   
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.   
   
   
Disclaimer:   
Please note that we have created this patch for version 18.2.0.44 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.  Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.   
   
Regards,   
Niranjan Kumar Gopalan  



SM Steve McWilliams August 28, 2020 08:33 PM UTC

Thanks so much.
I believe it is working correctly now in our application.
We need a bit more testing to be really sure, but so far it looks great.


UN Unknown Syncfusion Team August 31, 2020 02:28 AM UTC

Hi Steve, 

Thanks for your update. 

We are glad to know the reported query has been resolved at your end. We are happy to assist you always! 

Regards, 
Niranjan  




SM Steve McWilliams September 3, 2020 08:05 PM UTC

Patch is mostly working, but we did find another issue.

In the attached solution, if you  highlight some text (the word "this" for example), instead of replacing the highlighted word with a tab char, the highlighted text remains and tab chars are inserted at or near beginning of line.

Do you see this behavior also?

Attachment: EditControlTabHighlightedText_c8515d6d.zip


UN Unknown Syncfusion Team September 4, 2020 09:24 AM UTC

Hi Steve   
   
Thanks for your update.  
  
We have checked your query “When press tab key after selection of word in EditControl it inserts tab space in beginning of line” and logged it as defect. We will provide patch for the reported issue on September 18, 2020. Please refer the below feedback for same. 
 
   
Regards,   
Niranjan Kumar Gopalan  




SM Steve McWilliams September 22, 2020 01:17 PM UTC

Any update on this patch ?


UN Unknown Syncfusion Team September 23, 2020 05:39 AM UTC

Hi Steve, 
 
Thanks for your patience. 
 
We have checked your query and it can be achieved by setting the IsIndentSelectionOnTabEnabled to False. When this property is set as True, tab space will be inserted at the beginning of the line where the selection has been done. When this property is set as False, the selected text will be removed and tab space will be inserted which is the required behavior when tab key is pressed. Please refer the below code snippet and sample for same. 
 
C#: 
RcpSettingLanguage rsp = new RcpSettingLanguage(blah); 
rsp.Lexem = Lexem; 
blah.CustomLanguage = rsp; 
blah.CustomLanguage.IsIndentSelectionOnTabEnabled = false; 
 
 
 
Regards, 
Niranjan Kumar Gopalan 



SM Steve McWilliams September 23, 2020 02:27 PM UTC

Thanks so much.
It is working now after implementing that change


UN Unknown Syncfusion Team September 24, 2020 04:30 AM UTC

Hi Steve, 

Thanks for your update. 

We are glad to know the reported query has been resolved. We are happy to assist you always. 

Regards, 
Niranjan Kumar Gopalan 


Loader.
Up arrow icon