Skip to content

update to 18.4.46 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions controls/base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## [Unreleased]

## 18.4.44 (2021-02-23)

### Common

#### Bug Fixes

- `I309800` - Resolved Events are not properly triggered when using `EJ2 controls` with the Windows web browser.

## 18.4.43 (2021-02-16)

### Common

#### Bug Fixes

- `I309628, I314101` - Resolved unwanted `Swipe event` trigger in Firefox.

## 18.4.42 (2021-02-09)

### Common
Expand Down
2 changes: 1 addition & 1 deletion controls/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-base",
"version": "18.4.41",
"version": "18.4.44",
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down
2 changes: 1 addition & 1 deletion controls/base/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class Browser {
isPointer: 'pointercancel', isTouch: 'touchcancel', isDevice: 'mouseleave'
}
};
return (Browser.isPointer ? events[event].isPointer :
return (Browser.isPointer && !Browser.isWindows ? events[event].isPointer :
(Browser.isTouch ? events[event].isTouch + (!Browser.isDevice ? ' ' + events[event].isDevice : '')
: events[event].isDevice));
}
Expand Down
5 changes: 5 additions & 0 deletions controls/base/src/touch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ export class Touch extends Base<HTMLElement> implements INotifyPropertyChanged {
diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
this.isTouchMoved = diffX > 1 || diffY > 1;
// tslint:disable-next-line:no-any
const isFirefox: boolean = (/Mozilla|Firefox/).test(Browser.userAgent);
if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === 'mouseup') {
this.isTouchMoved = false;
}
this.endPoint = point;
this.calcPoints(evt);
let swipeArgs: SwipeEventArgs = {
Expand Down
8 changes: 8 additions & 0 deletions controls/buttons/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## [Unreleased]

## 18.4.44 (2021-02-23)

### CheckBox

#### Bug Fixes

- Issue with destroy has been fixed.

## 18.4.41 (2021-02-02)

### CheckBox
Expand Down
2 changes: 1 addition & 1 deletion controls/buttons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-buttons",
"version": "18.4.41",
"version": "18.4.44",
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions controls/buttons/spec/radio-button.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ describe('RadioButton', () => {
let htmlele: Element = document.body;
expect(window.getComputedStyle(htmlele).backgroundColor).toBe('rgb(0, 0, 255)');
});
it('Enable Html Attributes testing', () => {
radio = new RadioButton({ htmlAttributes: {'title':'Choose Option'}, label: '<style>body{background:rgb(0, 0, 255)}</style>' }, '#radio');
let htmlele: Element = document.body;
expect(window.getComputedStyle(htmlele).backgroundColor).toBe('rgb(0, 0, 255)');
});
});

describe('Notify property changes of', () => {
Expand Down
17 changes: 12 additions & 5 deletions controls/buttons/src/check-box/check-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
}

private focusOutHandler(): void {
this.getWrapper().classList.remove('e-focus');
let wrapper: Element = this.getWrapper();
if (wrapper) {
wrapper.classList.remove('e-focus');
}
this.isFocused = false;
}

Expand All @@ -259,7 +262,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
}

private getWrapper(): Element {
if (this.element.parentElement) {
if (this.element && this.element.parentElement) {
return this.element.parentElement.parentElement;
} else {
return null;
Expand Down Expand Up @@ -455,15 +458,19 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
}

private setText(text: string): void {
let label: Element = this.getWrapper().getElementsByClassName(LABEL)[0];
let wrapper: Element = this.getWrapper();
if (!wrapper) {
return;
}
let label: Element = wrapper.getElementsByClassName(LABEL)[0];
if (label) {
label.textContent = text;
} else {
text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;
label = this.createElement('span', { className: LABEL, innerHTML: text });
let labelWrap: Element = this.getWrapper().getElementsByTagName('label')[0];
let labelWrap: Element = wrapper.getElementsByTagName('label')[0];
if (this.labelPosition === 'Before') {
labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName(FRAME)[0]);
labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);
} else {
labelWrap.appendChild(label);
}
Expand Down
45 changes: 28 additions & 17 deletions controls/buttons/src/radio-button/radio-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP

private changeHandler(event: Event): void {
this.checked = true; this.dataBind();
let value: string = this.isVue ? this.element.value : this.value;
let value: string = this.element.getAttribute('value');
value = this.isVue && value ? this.element.value : this.value;
this.trigger('change', <ChangeArgs>{ value: value, event: event });
if (this.tagName === 'EJS-RADIOBUTTON') {
event.stopPropagation();
Expand Down Expand Up @@ -181,7 +182,10 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP
}

private focusOutHandler(): void {
this.getLabel().classList.remove('e-focus');
let label: Element = this.getLabel();
if (label) {
label.classList.remove('e-focus');
}
}

protected getModuleName(): string {
Expand Down Expand Up @@ -215,7 +219,11 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP
}

private getLabel(): Element {
return this.element.nextElementSibling;
if (this.element) {
return this.element.nextElementSibling;
} else {
return null;
}
}

private initialize(): void {
Expand All @@ -227,10 +235,11 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP
if (this.name) {
this.element.setAttribute('name', this.name);
}
if (this.isVue && this.element.value && this.element.value === this.value) {
let value: string = this.element.getAttribute('value');
if (this.isVue && value && value === this.value) {
this.checked = true;
}
if (this.value && (!this.isVue || !this.element.value)) {
if (this.isVue ? this.value && !value : this.value) {
this.element.setAttribute('value', this.value);
}
if (this.checked) {
Expand Down Expand Up @@ -393,18 +402,20 @@ export class RadioButton extends Component<HTMLInputElement> implements INotifyP

private setText(text: string): void {
let label: Element = this.getLabel();
let textLabel: Element = label.getElementsByClassName(LABEL)[0];
if (textLabel) {
textLabel.textContent = text;
} else {
text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;
textLabel = this.createElement('span', { className: LABEL, innerHTML: text });
label.appendChild(textLabel);
}
if (this.labelPosition === 'Before') {
this.getLabel().classList.add('e-right');
} else {
this.getLabel().classList.remove('e-right');
if (label) {
let textLabel: Element = label.getElementsByClassName(LABEL)[0];
if (textLabel) {
textLabel.textContent = text;
} else {
text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;
textLabel = this.createElement('span', { className: LABEL, innerHTML: text });
label.appendChild(textLabel);
}
if (this.labelPosition === 'Before') {
this.getLabel().classList.add('e-right');
} else {
this.getLabel().classList.remove('e-right');
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion controls/calendars/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-calendars",
"version": "18.4.41",
"version": "18.4.43",
"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.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down

This file was deleted.

This file was deleted.

Loading