🐛(layer): firefox 下 move 和 resize 异常
This commit is contained in:
		
							parent
							
								
									4e6a77ee19
								
							
						
					
					
						commit
						7269d2d99a
					
				@ -4,7 +4,8 @@ const useMove = function (el: HTMLElement, callback: Function) {
 | 
				
			|||||||
  let offsetY: number;
 | 
					  let offsetY: number;
 | 
				
			||||||
  if (el != null) {
 | 
					  if (el != null) {
 | 
				
			||||||
    el.addEventListener("mousedown", function (event: any) {
 | 
					    el.addEventListener("mousedown", function (event: any) {
 | 
				
			||||||
      if (event.path[0].className === "layui-layer-title") {
 | 
					      const path = event.path || (event.composedPath && event.composedPath());
 | 
				
			||||||
 | 
					      if (path[0].className === "layui-layer-title") {
 | 
				
			||||||
        if (event.button == 0 && el != null) {
 | 
					        if (event.button == 0 && el != null) {
 | 
				
			||||||
          const lexObj: any = getComputedStyle(el);
 | 
					          const lexObj: any = getComputedStyle(el);
 | 
				
			||||||
          offsetX =
 | 
					          offsetX =
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,8 @@
 | 
				
			|||||||
const useMove = function (el: HTMLElement, callback: Function) {
 | 
					const useMove = function (el: HTMLElement, callback: Function) {
 | 
				
			||||||
  if (el != null) {
 | 
					  if (el != null) {
 | 
				
			||||||
    el.addEventListener("mousedown", function (event: any) {
 | 
					    el.addEventListener("mousedown", function (event: any) {
 | 
				
			||||||
      if (event.path[0].className === "layui-layer-resize") {
 | 
					      const path = event.path || (event.composedPath && event.composedPath());
 | 
				
			||||||
 | 
					      if (path[0].className === "layui-layer-resize") {
 | 
				
			||||||
        if (event.button == 0 && el != null) {
 | 
					        if (event.button == 0 && el != null) {
 | 
				
			||||||
          var x = el.offsetLeft;
 | 
					          var x = el.offsetLeft;
 | 
				
			||||||
          var y = el.offsetTop;
 | 
					          var y = el.offsetTop;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user