[Rt-commit] rt branch, master, updated. rt-4.4.4-705-g2d09549074

? sunnavy sunnavy at bestpractical.com
Fri Jan 17 17:50:09 EST 2020


The branch, master has been updated
       via  2d09549074bfb5420e34a0ca1a3fab789cc26b68 (commit)
      from  74ace6683658db68441eb409b64de3225a2ea26d (commit)

Summary of changes:
 share/html/Elements/CollectionAsTable/Row | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 2d09549074bfb5420e34a0ca1a3fab789cc26b68
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 18 05:54:24 2020 +0800

    Disable autocomplete for inline edit forms
    
    Browsers autocomplete forms they think similar by default. At least for
    Firefox, whose similarity rules seem related to the position of forms on
    the same page, thus inline edit could easily confuse it, e.g.
    
    In "10 newest unowned tickets" on homepage, if you resolve the 1st
    ticket using inline edit, then refresh the page, the previous 2nd ticket
    will be the first one. If you inline edit its status, the default value
    will be "resolved" instead, wrongly "autocompleted" by browser.
    
    Autocomplete isn't useful for inline edit forms anyway, so here we
    disable it at the form level.

diff --git a/share/html/Elements/CollectionAsTable/Row b/share/html/Elements/CollectionAsTable/Row
index 87c86f7049..c963d7c087 100644
--- a/share/html/Elements/CollectionAsTable/Row
+++ b/share/html/Elements/CollectionAsTable/Row
@@ -174,7 +174,7 @@ foreach my $column (@Format) {
     $m->out('>');
 
     if ( $attrs{edit} ) {
-        $m->out( '<form method="POST" action="' . RT->Config->Get('WebPath') . '/Helpers/TicketUpdate?id=' . $record->id . '" class="editor">' );
+        $m->out( '<form method="POST" action="' . RT->Config->Get('WebPath') . '/Helpers/TicketUpdate?id=' . $record->id . '" class="editor" autocomplete="off">' );
         $m->out( $attrs{edit} );
         $m->out( '<span class="cancel text-danger far fa-times-circle" data-toggle="tooltip" data-placement="top" data-original-title="' . loc('Cancel') . '"></span>' );
         $m->out( '<span class="submit text-success far fa-check-circle" data-toggle="tooltip" data-placement="top" data-original-title="' . loc('Save') . '"></span>' );

-----------------------------------------------------------------------


More information about the rt-commit mailing list