File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1501,8 +1501,10 @@ const Buffer = Module("buffer", {
1501
1501
modes . set ( modes . INSERT ) ;
1502
1502
else if ( Buffer . focusedWindow . getSelection ( ) . toString ( ) != "" )
1503
1503
modes . set ( modes . VISUAL , modes . TEXTAREA ) ;
1504
- else
1504
+ else {
1505
+ options . setPref ( "accessibility.browsewithcaret" , true ) ;
1505
1506
modes . main = modes . TEXTAREA ;
1507
+ }
1506
1508
} else {
1507
1509
// setting this option notifies an observer which takes care of the
1508
1510
// mode setting
Original file line number Diff line number Diff line change @@ -478,7 +478,7 @@ const Editor = Module("editor", {
478
478
} , {
479
479
getEditor : function ( ) {
480
480
let e = liberator . focus ;
481
- if ( ! e ) {
481
+ if ( ! e || e . isContentEditable ) {
482
482
e = document . commandDispatcher . focusedWindow ;
483
483
if ( ! Editor . windowIsEditable ( e ) )
484
484
return null ;
@@ -509,8 +509,8 @@ const Editor = Module("editor", {
509
509
. QueryInterface ( Ci . nsIInterfaceRequestor )
510
510
. getInterface ( Ci . nsIEditingSession ) ;
511
511
return editingSession . windowIsEditable ( win ) &&
512
- win . document . body &&
513
- util . computedStyle ( win . document . body ) . getPropertyValue ( "-moz-user-modify" ) == "read-write" ;
512
+ ( win . document . designMode === "on" ||
513
+ ( services . get ( "focus" ) . getFocusedElementForWindow ( win , true , { } ) || { } ) . isContentEditable ) ;
514
514
}
515
515
} , {
516
516
mappings : function ( ) {
You can’t perform that action at this time.
0 commit comments