Open sebilasse opened 6 years ago
@sebilasse thanks for bringing this to our attention, it appears that IE and Edge only partially support this right now. We will look into switching over our usage as we make changes to improve our widgets and support a material theme.
Please see https://github.com/dojo/widgets/search?q=which&unscoped_q=which There are multiple references to
event.which
which has been removed from the Web standards and for which Mozilla says "Be aware that this feature may cease to work at any time."It will be replaced by
event.key
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key so it might be better to use(event.key || event.which)
now. Maybe it could be nice to have ameta
for Keys (?)There are also several "mimics" for
.which
which could be replaced by.key
and an Enum in https://github.com/dojo/widgets/blob/master/src/common/util.ts where the strings could equal.key
. E.g. "Left", "Up", "Right", "Down" becomes "ArrowLeft" etc. and Space becomes ' ' Personally I am usingusage
my 2 cents:
key
is also a much better naming than.which
which is confusing because a KeyboardEvent also has "generic" properties shared with other Events …