ngx-contextmenu icon indicating copy to clipboard operation
ngx-contextmenu copied to clipboard

Arrow keys in input type="time" not changing time

Open devel112 opened this issue 7 years ago • 5 comments

Changing time on an <input type="time"> with arrow keys doesn't work.

devel112 avatar Nov 30 '17 12:11 devel112

Can you explain the steps to reproduce this problem? My initial test worked fine.

isaacplmann avatar Nov 30 '17 13:11 isaacplmann

I just tested it in a fresh @anguar/cli project and using:

<context-menu> <ng-template contextMenuItem passive="true"> <input type="time"> </ng-template> </context-menu>

Steps: Set focus on the input's hour or minute part using mouse. Try to increase/decrease hour or minute value using the up or down arrow keys on the keyboard.

Dependencies: "dependencies": { "@angular/animations": "^5.0.0", "@angular/common": "^5.0.0", "@angular/compiler": "^5.0.0", "@angular/core": "^5.0.0", "@angular/forms": "^5.0.0", "@angular/http": "^5.0.0", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/router": "^5.0.0", "@angular/cdk": "^5.0.0-rc.2", "core-js": "^2.4.1", "rxjs": "^5.5.2", "zone.js": "^0.8.14", "ngx-contextmenu": "^3.0.2" },

devel112 avatar Nov 30 '17 14:11 devel112

Ah, that explains the problem. Thanks. It's on my list.

isaacplmann avatar Nov 30 '17 14:11 isaacplmann

Here's a work around you can use until I figure out a better fix:

<context-menu>
  <ng-template contextMenuItem passive="true"> <input (keydown)="$event.stopPropagation()" type="time"> </ng-template>
</context-menu>

isaacplmann avatar Nov 30 '17 22:11 isaacplmann

Awesome!

devel112 avatar Dec 01 '17 08:12 devel112