Skip to content

Commit

Permalink
Merge pull request #202 from Milooz/Milooz-patch-1
Browse files Browse the repository at this point in the history
Add `onfocusout` and `onfocusin` support
  • Loading branch information
Slamdunk authored Jan 20, 2023
2 parents a668218 + 6047e94 commit 0ee5537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/View/Helper/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ abstract class AbstractHelper extends BaseAbstractHelper
'onended' => true, // https://html.spec.whatwg.org/#handler-onended
'onerror' => true, // https://html.spec.whatwg.org/#handler-onerror
'onfocus' => true, // https://html.spec.whatwg.org/#handler-onfocus
'onfocusin' => true, // https://developer.mozilla.org/fr/docs/Web/API/Element/focusin_event
'onfocusout' => true, // https://developer.mozilla.org/fr/docs/Web/API/Element/focusout_event
'oninput' => true, // https://html.spec.whatwg.org/#handler-oninput
'oninvalid' => true, // https://html.spec.whatwg.org/#handler-oninvalid
'onkeydown' => true, // https://html.spec.whatwg.org/#handler-onkeydown
Expand Down
4 changes: 4 additions & 0 deletions test/View/Helper/FormInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ public function validAttributes(): array
['onended', 'assertStringContainsString'],
['onerror', 'assertStringContainsString'],
['onfocus', 'assertStringContainsString'],
['onfocusin', 'assertStringContainsString'],
['onfocusout', 'assertStringContainsString'],
['oninput', 'assertStringContainsString'],
['oninvalid', 'assertStringContainsString'],
['onkeydown', 'assertStringContainsString'],
Expand Down Expand Up @@ -244,6 +246,8 @@ public function getCompleteElement(): Element
'onended' => 'value',
'onerror' => 'value',
'onfocus' => 'value',
'onfocusin' => 'value',
'onfocusout' => 'value',
'oninput' => 'value',
'oninvalid' => 'value',
'onkeydown' => 'value',
Expand Down

0 comments on commit 0ee5537

Please sign in to comment.