craigrow  
                
                  
                    March 18, 2024,  6:45pm
                   
                  1 
               
             
            
              [Steps]
Open a wiki page for editing. 
Make some edits. 
Put an upper case ‘S’ anywhere 
The Share dialog will open (picture attached). 
Dismiss the dialog by clicking the X 
 
[Result]
All edits made to the wiki are lost. 
 
[Expected]
Shift + S should not result in losing my edits. 
 
Note: upon further investigation, this seems to only happen when typing the first character into a cell. For example, “My Show Stopper” will not trigger the dialog. “Showstopper” will.
             
            
              3 Likes 
            
            
           
          
            
            
              Hi @craigrow  
Are you using the table-builder, by any chance? If so, I think I have a repro of what you’re seeing.
Open table in edit mode 
Enter cell 
Use Shift  + s  to enter a capital S 
Share modal opens instead and closes table builder edit, losing any changes 
 
I think the keyboard shortcut is being over-eager there. Let me see if I can get someone to take a look. 
             
            
              1 Like 
            
            
           
          
            
              
                craigrow  
                
                  
                    March 19, 2024,  3:51pm
                   
                  7 
               
             
            
              Yes, that is correct. I click this edit button here.
             
            
              3 Likes 
            
            
           
          
            
              
                keegan  
              
                  
                    March 21, 2024,  7:16pm
                   
                  8 
               
             
            
              Thanks for submitting this issue @craigrow , this should now be resolved 
  
  
    
    
  
      
    
      discourse:main ← discourse:fix-table-builder-keyboard-shortcuts
    
      
        
          opened 11:19PM - 20 Mar 24 UTC 
        
        
        
       
   
 
  
    This PR makes use of the KeyboardShortcuts [`pause()`](https://github.com/discou… rse/discourse/blob/058b70c82f97c13d62b3efff8ef843d9fce92426/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js#L212-L236) method to pause keyboard shortcuts while the table builder's insert table modal is active.
This is necessary because some keyboard shortcuts such as <kbd>Shift</kbd> + <kbd>S</kbd> or <kbd>?</kbd> trigger modals. When those modals are triggered, they replace the insert table modal causing any edits made to spreadsheet to be lost.
Meta bug report: https://meta.discourse.org/t/shift-s-lose-all-edits-to-wiki/299851?u=keegan
### Before
https://github.com/discourse/discourse/assets/30090424/0b06d86b-5a62-4870-bebb-79f5bfc7c7da
### After
https://github.com/discourse/discourse/assets/30090424/2ca76046-7ff3-45c1-a35f-f0d0868bd28f 
   
   
  
    
    
  
  
 
             
            
              3 Likes 
            
            
           
          
            
              
                keegan  
              
                  
                    March 23, 2024,  7:17pm
                   
                  9 
               
             
            
              This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.