Skip to content

Commit d2913c6

Browse files
author
pipeline
committed
v27.2.3 is released
1 parent 41f4fe9 commit d2913c6

File tree

247 files changed

+5988
-2237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+5988
-2237
lines changed

controls/barcodegenerator/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.2 (2024-11-15)
5+
## 27.2.3 (2024-11-21)
66

77
### Barcode
88

controls/buttons/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
#### Bug Fixes
1010

11+
- `#F857466`- The issue with "Need to set the label tag for attribute if user changes the checkbox input id in checkbox component" has been resolved.
12+
- `#F95768`- The issue with "Parent element click event `prevented` while clicking on switch component in angular." has been resolved.
13+
14+
## 27.1.58 (2024-11-05)
15+
16+
### Checkbox
17+
18+
#### Bug Fixes
19+
1120
- `#F95768`- The issue with "Checkbox not getting checked while using `usestate` in react" has been resolved.
1221

1322
## 27.1.53 (2024-10-15)

controls/buttons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-buttons",
3-
"version": "27.1.53",
3+
"version": "27.2.2",
44
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/buttons/spec/switch.spec.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,40 @@ describe('Switch', () => {
416416
});
417417
});
418418

419+
describe('Parent element click event prevented while clicking on switch component', () => {
420+
let switchBtn: Switch;
421+
let input: HTMLElement;
422+
let parentElement: HTMLElement;
423+
let parentChecked: boolean = false;
424+
beforeEach(() => {
425+
parentElement = createElement('div', {
426+
id: 'form'
427+
}) as HTMLElement;
428+
input = createElement('input', { id: 'switch1' }) as HTMLElement;
429+
parentElement.appendChild(input);
430+
parentElement.onclick = function () {
431+
parentChecked = true;
432+
}
433+
document.body.appendChild(parentElement);
434+
});
435+
afterEach(() => {
436+
parentElement.remove();
437+
switchBtn.destroy();
438+
})
439+
it('ej2-918217: Parent element click event prevented while clicking on switch component in angular platforms.', () => {
440+
switchBtn = new Switch({
441+
checked: true
442+
}, '#switch1');
443+
switchBtn.click();
444+
expect(parentChecked).toBeTruthy();
445+
const event: any = {
446+
preventDefault: (): void => { },
447+
type: 'mousedown'
448+
};
449+
(switchBtn as any).mouseLeaveHandler(event);
450+
});
451+
});
452+
419453
describe('Switch in HTML5 forms', () => {
420454
let input: HTMLFormElement;
421455
let input1: HTMLFormElement;

controls/buttons/src/check-box/check-box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
372372
this.element.parentNode.insertBefore(wrapper, this.element);
373373
}
374374
}
375-
const label: Element = this.createElement('label', { attrs: { for: this.element.id } });
375+
const label: Element = this.createElement('label', { attrs: { for: this.htmlAttributes.id ? this.htmlAttributes.id : this.element.id } });
376376
const frameSpan: Element = this.createElement('span', { className: 'e-icons ' + FRAME });
377377
wrapper.classList.add('e-wrapper');
378378
if (this.enableRtl) {

controls/buttons/src/switch/switch.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,6 @@ export class Switch extends Component<HTMLInputElement> implements INotifyProper
164164
this.element.focus();
165165
const changeEventArgs: ChangeEventArgs = { checked: this.element.checked, event: evt };
166166
this.trigger('change', changeEventArgs);
167-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
168-
if ((this as any).isAngular && evt) {
169-
evt.stopPropagation();
170-
evt.preventDefault();
171-
}
172167
}
173168
/**
174169
* Destroys the Switch widget.
@@ -427,10 +422,15 @@ export class Switch extends Component<HTMLInputElement> implements INotifyProper
427422
}
428423
}
429424
}
430-
private switchFocusHandler(): void {
425+
private switchFocusHandler(e?: KeyboardEvent): void {
431426
if (this.isFocused) {
432427
(this.getWrapper() as Element).classList.add('e-focus');
433428
}
429+
if (e && e.type === 'keyup' && e.code === 'Space' && (this as any).isAngular) {
430+
this.clickHandler(e);
431+
e.stopPropagation();
432+
e.preventDefault();
433+
}
434434
}
435435
private switchMouseUp(e: MouseEventArgs): void {
436436
let aTouchY: number = 0; let yDiff: number = 0;

controls/calendars/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## [Unreleased]
44

5+
## 27.2.3 (2024-11-21)
6+
7+
### DatePicker
8+
9+
#### Bug Fixes
10+
11+
- `#I648389` - Fixed an issue where the CSS for the selected value was removed when the minimum and maximum properties were changed dynamically.
12+
13+
- `#I654432` - Fixed an issue where the Clear Icon was displayed when the enable mask support had no value.
14+
515
## 27.2.2 (2024-11-15)
616

717
### DatePicker

controls/calendars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-calendars",
3-
"version": "27.1.57",
3+
"version": "27.2.2",
44
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/calendars/spec/datetimepicker/datetimepicker.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4530,6 +4530,8 @@ describe('Masked date time backspace with minute ', () => {
45304530
datetimepicker.element.selectionStart = 0;
45314531
mouseEventArgs.e.key = 'Backspace';
45324532
(<any>mask).maskKeydownHandler(mouseEventArgs);
4533+
datetimepicker.focusIn();
4534+
(<any>mask).clearHandler();
45334535
datetimepicker.destroy();
45344536
});
45354537

controls/calendars/src/datepicker/datepicker.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,9 @@ export class DatePicker extends Calendar implements IInput {
10571057
this.inputElement.selectionEnd = this.inputElement.value.length;
10581058
}
10591059
}
1060+
if (this.enableMask && this.showClearButton && this.inputElement && this.inputElement.value === this.maskedDateValue && this.inputWrapper && this.inputWrapper.clearButton && !this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
1061+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
1062+
}
10601063
const focusArguments: BlurEventArgs = {
10611064
model: this
10621065
};
@@ -1566,6 +1569,9 @@ export class DatePicker extends Calendar implements IInput {
15661569
}
15671570
protected keyupHandler(e: KeyboardEventArgs): void {
15681571
this.isKeyAction = (this.inputElement.value !== this.previousElementValue) ? true : false;
1572+
if (this.enableMask && this.showClearButton && this.inputElement && this.inputElement.value === this.maskedDateValue && this.inputWrapper && this.inputWrapper.clearButton && !this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
1573+
this.inputWrapper.clearButton.classList.add('e-clear-icon-hide');
1574+
}
15691575
}
15701576
protected changeEvent(event?: MouseEvent | KeyboardEvent | Event): void {
15711577
if (!this.isIconClicked && !(this.isBlur || this.isKeyAction)) {

0 commit comments

Comments
 (0)