@@ -172,6 +172,7 @@ function inputTextareaDirective($mdUtil, $window, $compile, $animate) {
172172
173173 var containerCtrl = ctrls [ 0 ] ;
174174 var ngModelCtrl = ctrls [ 1 ] || $mdUtil . fakeNgModel ( ) ;
175+ var isReadonly = angular . isDefined ( attr . readonly ) ;
175176
176177 if ( ! containerCtrl ) return ;
177178 if ( containerCtrl . input ) {
@@ -205,15 +206,18 @@ function inputTextareaDirective($mdUtil, $window, $compile, $animate) {
205206 ngModelCtrl . $parsers . push ( ngModelPipelineCheckValue ) ;
206207 ngModelCtrl . $formatters . push ( ngModelPipelineCheckValue ) ;
207208
208- element
209- . on ( 'input' , inputCheckValue )
210- . on ( 'focus' , function ( ev ) {
211- containerCtrl . setFocused ( true ) ;
212- } )
213- . on ( 'blur' , function ( ev ) {
214- containerCtrl . setFocused ( false ) ;
215- inputCheckValue ( ) ;
216- } ) ;
209+ element . on ( 'input' , inputCheckValue ) ;
210+
211+ if ( ! isReadonly ) {
212+ element
213+ . on ( 'focus' , function ( ev ) {
214+ containerCtrl . setFocused ( true ) ;
215+ } )
216+ . on ( 'blur' , function ( ev ) {
217+ containerCtrl . setFocused ( false ) ;
218+ inputCheckValue ( ) ;
219+ } ) ;
220+ }
217221
218222 scope . $on ( '$destroy' , function ( ) {
219223 containerCtrl . setFocused ( false ) ;
0 commit comments