jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/355083 )

Change subject: Remove IE8 hacks
......................................................................


Remove IE8 hacks

Change-Id: I23e33e3498487bedcc50d95e2162175e940882c4
---
M modules/jquery.wikiEditor.dialogs.config.js
M modules/jquery.wikiEditor.html
M modules/jquery.wikiEditor.js
M modules/jquery.wikiEditor.toolbar.js
4 files changed, 1 insertion(+), 36 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/modules/jquery.wikiEditor.dialogs.config.js 
b/modules/jquery.wikiEditor.dialogs.config.js
index eb3f649..757d90c 100644
--- a/modules/jquery.wikiEditor.dialogs.config.js
+++ b/modules/jquery.wikiEditor.dialogs.config.js
@@ -511,9 +511,6 @@
                                                                        .prop( 
'checked', false );
                                                        },
                                                        
'wikieditor-toolbar-tool-link-cancel': function () {
-                                                               // Clear any 
saved selection state
-                                                               var context = 
$( this ).data( 'context' );
-                                                               
context.fn.restoreCursorAndScrollTop();
                                                                $( this 
).dialog( 'close' );
                                                        }
                                                },
@@ -528,9 +525,6 @@
                                                        ) );
                                                        // Pre-fill the text 
fields based on the current selection
                                                        context = $( this 
).data( 'context' );
-                                                       // Restore and 
immediately save selection state, needed for inserting stuff later
-                                                       
context.fn.restoreCursorAndScrollTop();
-                                                       
context.fn.saveCursorAndScrollTop();
                                                        selection = 
context.$textarea.textSelection( 'getSelection' );
                                                        $( 
'#wikieditor-toolbar-link-int-target' ).focus();
                                                        // Trigger the change 
event, so the link status indicator is up to date
@@ -655,9 +649,6 @@
                                                                $( 
'#wikieditor-toolbar-reference-text' ).val( '' );
                                                        },
                                                        
'wikieditor-toolbar-tool-reference-cancel': function () {
-                                                               // Clear any 
saved selection state
-                                                               var context = 
$( this ).data( 'context' );
-                                                               
context.fn.restoreCursorAndScrollTop();
                                                                $( this 
).dialog( 'close' );
                                                        }
                                                },
@@ -666,8 +657,6 @@
                                                        var selection, matches, 
text,
                                                                context = $( 
this ).data( 'context' );
                                                        // Restore and 
immediately save selection state, needed for inserting stuff later
-                                                       
context.fn.restoreCursorAndScrollTop();
-                                                       
context.fn.saveCursorAndScrollTop();
                                                        selection = 
context.$textarea.textSelection( 'getSelection' );
                                                        // set focus
                                                        $( 
'#wikieditor-toolbar-reference-text' ).focus();
diff --git a/modules/jquery.wikiEditor.html b/modules/jquery.wikiEditor.html
index 349f027..0bfd97e 100644
--- a/modules/jquery.wikiEditor.html
+++ b/modules/jquery.wikiEditor.html
@@ -3,17 +3,6 @@
 <head>
        <title>WikiEditor</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-       <!--[if gte IE 8]>
-               <style>
-                       /* IE8 ONLY - This is how we are fixing the 
double-height of BR tags when they are alone in a P tag */
-                       p > br {
-                               display: none;
-                       }
-                       p > br + br {
-                               display: block;
-                       }
-               </style>
-       <![endif]-->
        <style>
                body {
                        margin: 0;
diff --git a/modules/jquery.wikiEditor.js b/modules/jquery.wikiEditor.js
index a739cc9..efbe5de 100644
--- a/modules/jquery.wikiEditor.js
+++ b/modules/jquery.wikiEditor.js
@@ -473,14 +473,7 @@
                                 * Related to old IE 8 issues that are no 
longer reproducible
                                 */
                                saveCursorAndScrollTop: function () {
-                                       var IHateIE8;
-                                       if ( profile.name === 'msie' && 
document.selection && document.selection.createRange ) {
-                                               IHateIE8 = {
-                                                       scrollTop: 
context.$textarea.scrollTop(),
-                                                       pos: 
context.$textarea.textSelection( 'getCaretPosition', { startAndEnd: true } )
-                                               };
-                                               context.$textarea.data( 
'IHateIE8', IHateIE8 );
-                                       }
+                                       // Deprecated, do nothing
                                },
 
                                /**
diff --git a/modules/jquery.wikiEditor.toolbar.js 
b/modules/jquery.wikiEditor.toolbar.js
index c2c23a5..9f6915f 100644
--- a/modules/jquery.wikiEditor.toolbar.js
+++ b/modules/jquery.wikiEditor.toolbar.js
@@ -121,7 +121,6 @@
                                                                .append(
                                                                        $( 
$.wikiEditor.modules.toolbar.fn.buildCharacter( data.characters[ i ], actions ) 
)
                                                                                
.mousedown( function ( e ) {
-                                                                               
        context.fn.saveCursorAndScrollTop();
                                                                                
        // No dragging!
                                                                                
        e.preventDefault();
                                                                                
        return false;
@@ -346,7 +345,6 @@
                                                                .data( 
'action', tool.action )
                                                                .data( 
'context', context )
                                                                .mousedown( 
function ( e ) {
-                                                                       
context.fn.saveCursorAndScrollTop();
                                                                        // No 
dragging!
                                                                        
e.preventDefault();
                                                                        return 
false;
@@ -372,7 +370,6 @@
                                                                                
.data( 'action', tool.list[ option ].action )
                                                                                
.data( 'context', context )
                                                                                
.mousedown( function ( e ) {
-                                                                               
        context.fn.saveCursorAndScrollTop();
                                                                                
        // No dragging!
                                                                                
        e.preventDefault();
                                                                                
        return false;
@@ -425,7 +422,6 @@
                                        .attr( 'rel', id )
                                        .data( 'context', context )
                                        .mousedown( function ( e ) {
-                                               
context.fn.saveCursorAndScrollTop();
                                                // No dragging!
                                                e.preventDefault();
                                                return false;
@@ -442,7 +438,6 @@
                                                        $( this ).attr( 'rel' ),
                                                        { expires: 30, path: 
'/' }
                                                );
-                                               
context.fn.restoreCursorAndScrollTop();
                                                // No dragging!
                                                event.preventDefault();
                                                return false;
@@ -503,7 +498,6 @@
                                                                .html( html )
                                                                .children()
                                                                .mousedown( 
function ( e ) {
-                                                                       
context.fn.saveCursorAndScrollTop();
                                                                        // No 
dragging!
                                                                        
e.preventDefault();
                                                                        return 
false;

-- 
To view, visit https://gerrit.wikimedia.org/r/355083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I23e33e3498487bedcc50d95e2162175e940882c4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to