javascript - bootstrap input dropdown keyboard arrow -
i working combobox ( input + dropdown ) built around bootstrap on accessibility project.
i ran change made dropdown.js part of bootstrap between v3.3.0 , v3.3.1 breaks code.
when focus input
, or down keyboard arrow used trigger dropdown menu want since goal make keyboard-only navigation possible doesn't work anymore.
when compare :
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.js
and
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.js
the change ( 3.3.0, line 798 )
dropdown.prototype.keydown = function (e) { if (!/(38|40|27|32)/.test(e.which)) return
to ( 3.3.1, line 799 )
dropdown.prototype.keydown = function (e) { if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagname)) return
so, know can work around jquery there real reason change ? if not, can regarded bug report.
below bootply demo of widget. works bootstrap 3.3.0 , below if change bootstrap version popup above 3.3.0, doesn't respond arrows key.
there ongoing debate this, as logged in issue 15757.
the adjustment made in pull #15088 (dropdown: ignore keydown events coming inputs , textareas). don't state "why" necessary go route in release, after digging able find issue/debate involving developers , bootstrap team.
in debate, mentioned added:
"to allow spaces typed out in input within dropdown"
they still brainstorming solution, might suggest adding 2 cents debate. hope helps.
Comments
Post a Comment