[BUGFIX] Slider doesn't work in IE9
authorJigal van Hemert <jigal@xs4all.nl>
Sun, 11 Mar 2012 13:41:51 +0000 (14:41 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 12 Apr 2012 18:54:32 +0000 (20:54 +0200)
With the new X-UA-Compatible set to IE=9 for the backend the
TCA slider control will only work with an override.

Change-Id: Idf1dd379cfe273acaaca50589169d682cc13a766
Resolves: #32581
Releases: 4.8, 4.7, 4.6
Reviewed-on: http://review.typo3.org/9547
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/js/extjs/tceforms.js

index 843d359..c065fa4 100644 (file)
@@ -129,3 +129,28 @@ TYPO3.TCEFORMS = {
 
 }
 Ext.onReady(TYPO3.TCEFORMS.init, TYPO3.TCEFORMS);
+
+       // Fix for slider TCA control in IE9
+Ext.override(Ext.dd.DragTracker, {
+       onMouseMove:function (e, target) {
+               var isIE9 = Ext.isIE && (/msie 9/.test(navigator.userAgent.toLowerCase())) && document.documentMode != 6;
+               if (this.active && Ext.isIE && !isIE9 && !e.browserEvent.button) {
+                       e.preventDefault();
+                       this.onMouseUp(e);
+                       return;
+               }
+               e.preventDefault();
+               var xy = e.getXY(), s = this.startXY;
+               this.lastXY = xy;
+               if (!this.active) {
+                       if (Math.abs(s[0] - xy[0]) > this.tolerance || Math.abs(s[1] - xy[1]) > this.tolerance) {
+                               this.triggerStart(e);
+                       } else {
+                               return;
+                       }
+               }
+               this.fireEvent('mousemove', this, e);
+               this.onDrag(e);
+               this.fireEvent('drag', this, e);
+       }
+});
\ No newline at end of file