File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,6 +109,10 @@ export default TextField.extend({
109109 } ,
110110
111111 keyDown ( e ) {
112+ // On Firefox, ignore any key if input is readonly
113+ if ( this . get ( 'readonly' ) ) {
114+ return ;
115+ }
112116 let mask = this . get ( '_inputMask' ) ;
113117 if ( isUndo ( e ) ) {
114118 e . preventDefault ( ) ;
@@ -146,7 +150,8 @@ export default TextField.extend({
146150 // Ignore modified key presses
147151 // Ignore enter key to allow form submission
148152 // Ignore tab key to allow focussing other elements
149- if ( e . metaKey || e . altKey || e . ctrlKey || e . keyCode === 13 || e . keyCode === 9 ) {
153+ // On Firefox, ignore any key if input is readonly
154+ if ( e . metaKey || e . altKey || e . ctrlKey || e . keyCode === 13 || e . keyCode === 9 || this . get ( 'readonly' ) ) {
150155 return ;
151156 }
152157
@@ -162,6 +167,10 @@ export default TextField.extend({
162167 } ,
163168
164169 paste ( e ) {
170+ // On Firefox, ignore paste if input is readonly
171+ if ( this . get ( 'readonly' ) ) {
172+ return ;
173+ }
165174 e . preventDefault ( ) ;
166175 this . _updateMaskSelection ( ) ;
167176 // getData value needed for IE also works in FF & Chrome
You can’t perform that action at this time.
0 commit comments