nadment opened a new issue, #8861:
URL: https://github.com/apache/hop/issues/8861

   ### Apache Hop version?
   
   2.20.0-SNAPSHOT
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   In a `TableView`, a column of type `ColumnInfo.COLUMN_TYPE_TEXT_BUTTON` is 
edited with an inline text editor that carries a button on its right edge (the 
listener returned by `ColumnInfo.getTextVarButtonSelectionListener()`), 
typically used to open a browse or helper dialog.                               
                                                                                
                                                                                
                                                                         
                                                                                
                                                                                
                                                                                
                                    
   When the cell value contains a line break, `TableView.editText()` no longer 
opens that inline editor. It redirects straight to the multi-line pop-out 
editor (`editMultiline()`), which has no button. The button of the column is 
therefore unreachable for that cell: every attempt to edit it opens the pop-out 
again.                                                                          
                                                                                
                                                                          
                                                                                
                                                                                
                                                                                
                                    
   ### Steps to reproduce                                                       
                                                                                
                                                                                
                                  
                                                                                
                                                                                
                                                                                
                                    
     1. Open a dialog with a `TableView` that has a `COLUMN_TYPE_TEXT_BUTTON` 
column.                                                                         
                                                                                
                                      
     2. Put a value containing a line break in a cell of that column (paste it, 
or enter it through the multi-line pop-out).                                    
                                                                                
                                    
     3. Leave the cell, then click it again to edit it.                         
                                                                                
                                                                                
                                    
                                                                                
                                                                                
                                                                                
                                    
   ### Actual behavior                                                          
                                                                                
                                                                                
                                  
                                                                                
                                                                                
                                                                                
                                    
   The multi-line pop-out editor opens instead of the inline editor. The button 
attached to the column is not shown and cannot be reached.                      
                                                                                
                                  
                                                                                
                                                                                
                                                                                
                                    
   ### Expected behavior                                                        
                                                                                
                                                                                
                                  
                                                                                
                                                                                
                                                                                
                                    
   A `COLUMN_TYPE_TEXT_BUTTON` cell always opens its inline editor with its 
button, whatever the value contains. The automatic redirect to the multi-line 
pop-out should only apply to `COLUMN_TYPE_TEXT` columns.                        
                                        
                                                                                
                                                                                
                                                                                
                                    
   ### Cause                                                                    
                                                                                
                                                                                
                                  
                                                                                
                                                                                
                                                                                
                                    
   In `ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java`, 
`editText()` contains:                                                          
                                                                                
                                           
                                                                                
                                                                                
                                                                                
                                    
         if ((colinfo.getType() == ColumnInfo.COLUMN_TYPE_TEXT                  
                                                                                
                                                                                
                                    
                 || colinfo.getType() == ColumnInfo.COLUMN_TYPE_TEXT_BUTTON)    
                                                                                
                                                                                
                                    
             && indexOfLineBreak(getCellValue(row, colNr)) >= 0) {              
                                                                                
                                                                                
                                    
           editMultiline(row, rowNr, colNr, colinfo);                           
                                                                                
                                                                                
                                    
           return;                                                              
                                                                                
                                                                                
                                    
         }                                                                      
                                                                                
                                                                                
                                    
                                                                                
                                                                                
                                                                                
                                    
   The `COLUMN_TYPE_TEXT_BUTTON` condition should be removed from this test.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to