<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - (wishlist) "Input list" field: Add confirmation dialog in order to prevent lost of data"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=143144">143144</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>(wishlist) "Input list" field: Add confirmation dialog in order to prevent lost of data
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.3.0.0 alpha0+ Master
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dainius.mazuika@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
I usually forget to click "Add" button when editing "Input list" type of field.
Additional check could be implemented in order to warn user about possible loss
of text entered into input field.

Also, "ENTER" keypress could be made to act on "Add" button, instead of "OK"
button of the dialog.

Steps to Reproduce:
1. Place "Input list" field in the document;
2. Double click on it to open field edit dialog in order to add new items;
3. Pretend you are intending to add only single item (string "YES" as an
example), so:
4. Type in string "YES" inside input field (step no 1);
5. Click "Add" button (step no 2);
6. Click "OK" in main dialog (step no 3);

Usually, I forget to click button "Add" (step no 2), and after typing in "YES"
(step no 1) I click directly on main "OK" button (step no 3) in the dialog.
Whole dialog closes instantly without adding string "YES" to the input list,
and without noticing me that I forgot to click on "Add" button. My previously
entered string "YES" is lost. I need to reopen this dialog and make everything
correctly (frequently - type in long text.. :/ ).

I suggest: Additional checking routine should be executed upon "OK" button
press:

```
ON_OK_BUTTON_PRESS_EVENT
{
 if( inputField.Text != empty )
 {
  if( existing_list.does_not_contain( user_entered_text ) )
  {
    showDialog( "Do you want to add item "%s" into the list before closing? YES
/ NO", user_entered_text );

    if ( user_answer == "YES" )
    {
     AddItemToCurrentList( user_entered_text );
    }
  }
 }
ProceedToClosTheDialogAsUsual();
}
```

Actual Results:


Expected Results:



Reproducible: Always


User Profile Reset: No



Additional Info:</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>