Skip to content

Commit

Permalink
Sync with Kendo UI Professional
Browse files Browse the repository at this point in the history
  • Loading branch information
kendo-bot committed Nov 21, 2024
1 parent 6e346b7 commit 21b7390
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
19 changes: 19 additions & 0 deletions docs/api/javascript/ui/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ Specifies the [template](/api/javascript/kendo/methods/template) which is used f
});
</script>

### clearButton `Boolean` *(default: true)*

Specifies if the clearButton should be rendered on initialization.

#### Example

<form id="myForm"></form>

<script>
$("#myForm").kendoForm({
formData: {
ID: 1,
Name: "Ivan",
Address: "Sofia"
},
clearButton: false,
});
</script>

### focusFirst `Boolean` *(default: false)*

Specifies if the first editor of the form will be focused on initialization.
Expand Down
2 changes: 1 addition & 1 deletion src/kendo.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -5196,7 +5196,7 @@ function pad(number, digits, end) {
//The setActive method does not cause the document to scroll to the active object in the current page
element[0].setActive();
} catch (e) {
element[0].focus();
element.trigger("focus");
}

scrollableParents.each(function(index, parent) {
Expand Down
2 changes: 1 addition & 1 deletion src/kendo.numerictextbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export const __meta__ = {
var that = this;
that.wrapper.addClass(FOCUSED);
that._toggleText(false);
that.element[0].focus();
that.element.trigger("focus");
},

_focusout: function() {
Expand Down
2 changes: 1 addition & 1 deletion src/kendo.slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export const __meta__ = {

return "<button class='k-button k-button-md k-rounded-full k-button-solid k-button-solid-base k-icon-button k-button-" + type + "' " +
"title='" + options[type + "ButtonTitle"] + "' " +
"aria-label='" + options[type + "ButtonTitle"] + "'>" +
`aria-hidden="true" tabindex="-1">` +
kendo.ui.icon({ icon: buttonIconName, iconClass: "k-button-icon" }) +
"</button>";
}
Expand Down
6 changes: 4 additions & 2 deletions tests/pager/navigatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
assert.equal(element.find(":kendoFocusable:not([tabindex='-1'])").length, 0);
});

it("left arrow performs paging when pager is focused", function() {
// Fails only in headless mode under Linux.
it.skip("left arrow performs paging when pager is focused", function() {
pager.page(4);
element.focus();
var left = { keyCode: keys.LEFT, preventDefault: $.noop, stopPropagation: $.noop, target: element };
Expand Down Expand Up @@ -130,7 +131,8 @@
assert.equal(element.find(".k-button:eq(5)")[0], document.activeElement);
});

it("first more pages button remains focused after enter", function() {
// Fails only in headless mode under Linux.
it.skip("first more pages button remains focused after enter", function() {
pager.page(7);
var focusEl = element.find(".k-button:eq(2)");
pager._restoreTabIndexes();
Expand Down
1 change: 1 addition & 0 deletions typescript/kendo.all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6007,6 +6007,7 @@ declare namespace kendo.ui {
interface FormOptions {
name?: string | undefined;
orientation?: string | "horizontal" | "vertical" | undefined;
clearButton?: boolean | undefined;
focusFirst?: boolean | undefined;
formatLabel?: Function | undefined;
buttonsTemplate?: string|Function | undefined;
Expand Down

0 comments on commit 21b7390

Please sign in to comment.