Conversation
d78d010 to
5e7b105
Compare
733e8ac to
5b181e7
Compare
e303679 to
d7342c2
Compare
mvorisek
commented
May 21, 2023
| if ($this->buttonSave) { | ||
| $this->buttonSave = $this->layout->addButton($this->buttonSave); | ||
| $this->buttonSave->setAttr('tabindex', 0); | ||
| $jsSubmit = $this->js()->form('submit'); |
Member
Author
There was a problem hiding this comment.
Invoke div.ui.form submit, thanks to l138, the submit will be sent to the native form tag.
mvorisek
commented
May 22, 2023
| parent::init(); | ||
|
|
||
| $this->formElement = View::addTo($this, ['element' => 'form', 'shortName' => 'form'], ['FormElementOnly']); | ||
| $this->on('submit', new JsExpression('if (event.target === this) { []; }', [$this->formElement->js()->trigger('submit')])); |
Member
Author
There was a problem hiding this comment.
This is the main point of this PR, dispatch native event without instantiating Fomantic-UI form behaviour for the native form tag.
eb04a59 to
84def7b
Compare
84def7b to
a1d86a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related with #1275 and fomantic/Fomantic-UI#2792