File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 162
162
this . $backdrop = $ ( '<div class="modal-backdrop ' + animate + '" />' )
163
163
. appendTo ( document . body )
164
164
165
- if ( this . options . backdrop != 'static' ) {
166
- this . $backdrop . click ( $ . proxy ( this . hide , this ) )
167
- }
165
+ this . $backdrop . click (
166
+ this . options . backdrop == 'static' ?
167
+ $ . proxy ( this . $element [ 0 ] . focus , this . $element [ 0 ] )
168
+ : $ . proxy ( this . hide , this )
169
+ )
168
170
169
171
if ( doAnimate ) this . $backdrop [ 0 ] . offsetWidth // force reflow
170
172
Original file line number Diff line number Diff line change 878
878
this . $backdrop = $ ( '<div class="modal-backdrop ' + animate + '" />' )
879
879
. appendTo ( document . body )
880
880
881
- if ( this . options . backdrop != 'static' ) {
882
- this . $backdrop . click ( $ . proxy ( this . hide , this ) )
883
- }
881
+ this . $backdrop . click (
882
+ this . options . backdrop == 'static' ?
883
+ $ . proxy ( this . $element [ 0 ] . focus , this . $element [ 0 ] )
884
+ : $ . proxy ( this . hide , this )
885
+ )
884
886
885
887
if ( doAnimate ) this . $backdrop [ 0 ] . offsetWidth // force reflow
886
888
You can’t perform that action at this time.
0 commit comments