You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/4-forms-controls/4-forms-submit/1-modal-dialog/task.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,32 +2,32 @@ importance: 5
2
2
3
3
---
4
4
5
-
# Modal form
5
+
# Formuário modal
6
6
7
-
Create a function`showPrompt(html, callback)`that shows a form with the message`html`, an input field and buttons`OK/CANCEL`.
7
+
Crie uma função`showPrompt(html, callback)`onde mostra um formulário com uma mensagem`html`, um campo de entrada e botões`OK/CANCEL`.
8
8
9
-
-A user should type something into a text field and press `key:Enter`or the OK button, then `callback(value)`is called with the value they entered.
10
-
-Otherwise if the user presses`key:Esc`or CANCEL, then`callback(null)`is called.
9
+
-Um usuário deve esprever algo dentro do campo de texto e pressionar `key:Enter`ou o botão de OK button, então é chamado o `callback(value)`com o valor que foi inserido.
10
+
-Porém, se o usuário pressionar`key:Esc`ou CANCEL, então`callback(null)`é chamado.
11
11
12
-
In both cases that ends the input process and removes the form.
12
+
Em ambos os casos, isso encerra o processo de entrada e remove o formulário.
13
13
14
-
Requirements:
14
+
Requisitos:
15
15
16
-
-The form should be in the center of the window.
17
-
-The form is *modal*. In other words, no interaction with the rest of the page is possible until the user closes it.
18
-
-When the form is shown, the focus should be inside the `<input>` for the user.
19
-
-Keys `key:Tab`/`key:Shift+Tab`should shift the focus between form fields, don't allow it to leave for other page elements.
16
+
-O formulário deve estar no centro da janela.
17
+
-O formulário é um *modal*. Em outras palavras, não será possível interagir com o restante da página até que o usuário a feche.
18
+
-Quando o formulário for exibido, o foco do usuário deverá estar dentro do campo `<input>`.
19
+
-As teclas `key:Tab`/`key:Shift+Tab`devem alternar o foco entre os campos do formulário, não permitindo que o foco saia para outros elementos da página.
0 commit comments