diff --git a/common/js/common.js b/common/js/common.js index 00fbe2bd2..25c444bb3 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -900,7 +900,7 @@ function get_by_id(id) { jQuery(function($){ // display popup menu that contains member actions and document actions - $(document).click(function(evt) { + $(document).on('click touchstart', function(evt) { var $area = $('#popup_menu_area'); if(!$area.length) $area = $('
').appendTo(document.body); @@ -916,6 +916,18 @@ jQuery(function($){ if(cls) match = cls.match(new RegExp('(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)','')); if(!match) return; + // mobile에서 touchstart에 의한 동작 시 pageX, pageY 위치를 구함 + if(evt.pageX===undefined || evt.pageY===undefined) + { + var touch = evt.originalEvent.touches[0]; + if(touch!==undefined || !touch) + { + touch = evt.originalEvent.changedTouches[0]; + } + evt.pageX = touch.pageX; + evt.pageY = touch.pageY; + } + var action = 'get'+ucfirst(match[2])+'Menu'; var params = { mid : current_mid,