Skip to content

Commit

Permalink
fix(tags): incorrect validation (UIM-367) (#416)
Browse files Browse the repository at this point in the history
8x
  • Loading branch information
lskramarov authored and pimenovoleg committed Feb 20, 2020
1 parent 33a97be commit b4b3e9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions packages/mosaic-dev/validation/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ import {
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DateAdapter, MC_DATE_LOCALE } from '@ptsecurity/cdk/datetime';
import { COMMA, ENTER } from '@ptsecurity/cdk/keycodes';
import { CdkTreeModule, FlatTreeControl } from '@ptsecurity/cdk/tree';
import { MC_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter } from '@ptsecurity/mosaic-moment-adapter/adapter';
import { McAutocompleteModule } from '@ptsecurity/mosaic/autocomplete';
import { McButtonModule } from '@ptsecurity/mosaic/button';
import { MC_VALIDATION } from '@ptsecurity/mosaic/core';
import { McFormFieldModule } from '@ptsecurity/mosaic/form-field';
import { McIconModule } from '@ptsecurity/mosaic/icon';
import { McInputModule } from '@ptsecurity/mosaic/input';
Expand Down
6 changes: 3 additions & 3 deletions packages/mosaic/tags/tag-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ export class McTagList extends McTagListMixinBase implements McFormFieldControl<
// receive focus.
if (this.isValidIndex(tagIndex) && tag.hasFocus) {
this.lastDestroyedTagIndex = tagIndex;
} else if (this.isValidIndex(tagIndex) && !tag.hasFocus) {
this.focusInput();
}
});
}
Expand All @@ -832,9 +834,7 @@ export class McTagList extends McTagListMixinBase implements McFormFieldControl<
let currentElement = event.target as HTMLElement | null;

while (currentElement && currentElement !== this.elementRef.nativeElement) {
if (currentElement.classList.contains('mc-tag')) {
return true;
}
if (currentElement.classList.contains('mc-tag')) { return true; }

currentElement = currentElement.parentElement;
}
Expand Down
1 change: 0 additions & 1 deletion packages/mosaic/tree/tree-selection.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ export class McTreeSelection<T extends McTreeOption> extends CdkTree<T>

onKeyDown(event: KeyboardEvent): void {
this.keyManager.setFocusOrigin('keyboard');
console.log('onKeyDown: '); // tslint:disable-line:no-console
// tslint:disable-next-line: deprecation
const keyCode = event.keyCode;

Expand Down

0 comments on commit b4b3e9a

Please sign in to comment.