Search code examples
javascriptquilltabindex

Remove Tab from toolbar of primeng p-editor - not working on reactive forms


I have followed the solution on this stackoverflow question to remove the toolbar tabbing.

It works well with the initial p-editor on the page. However I have a button on my reactive form to create a new p-editor. It doesn't work and will tab on the toolbar. I have even called the same code as per the ngAfterViewInit (removeAttrtibute('tabindex')

Oddly if I add a subsequent p-editor the previous one now has tabbing working as expected.

Its like as if I haven't removed the attributes on time. Its not a timing issue because I tested it with a wait.


Solution

  • I think the answer is to not call a method to removeAttribute directly but to use a lifecycle hook.

    It seems to work with ngAfterViewChecked() however it seems to be called a lot. Its called on mouse scroll.