Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef29010

Browse files
committed
fix(editor): Fix focus on host element
1 parent 46d5339 commit ef29010

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "angular-editor",
3-
"version": "0.17.2",
3+
"version": "0.17.3",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7-
"build": "ng build --prod",
7+
"build": "ng build",
8+
"build-prod": "ng build --prod",
89
"test": "ng test",
910
"lint:lib": "ng lint angular-editor",
1011
"e2e": "ng e2e",

projects/angular-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kolkov/angular-editor",
3-
"version": "0.17.2",
3+
"version": "0.17.3",
44
"description": "A simple native WYSIWYG editor for Angular 6+, 7+, 8+",
55
"author": "Andrey Kolkov <[email protected]>",
66
"repository": "https://github.com/kolkov/angular-editor",

projects/angular-editor/src/lib/angular-editor.component.scss

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

2626
&:focus,
2727
&.focus {
28-
outline: 0;
28+
// outline: 0;
2929
}
3030

3131
::ng-deep blockquote {

projects/angular-editor/src/lib/angular-editor.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
AfterViewInit, Attribute, ChangeDetectorRef,
33
Component,
44
EventEmitter,
5-
forwardRef, HostBinding,
5+
forwardRef, HostBinding, HostListener,
66
Inject,
77
Input,
88
OnInit,
@@ -60,6 +60,9 @@ export class AngularEditorComponent implements OnInit, ControlValueAccessor, Aft
6060
@Output() focus: EventEmitter<string> = new EventEmitter<string>();
6161

6262
@HostBinding('attr.tabindex') tabindex = -1;
63+
@HostListener('focus') onFocus() {
64+
this.onEditorFocus();
65+
}
6366

6467
constructor(
6568
private r: Renderer2,

0 commit comments

Comments
 (0)