Skip to content
Snippets Groups Projects
Commit d86cb528 authored by Vincent Nivoliers's avatar Vincent Nivoliers
Browse files

fixed copy selection in mobile mode

parent b632551b
No related branches found
No related tags found
No related merge requests found
......@@ -712,7 +712,7 @@ function pgm_copy(evt) {
pgm_context.element = el ;
pgm_context.container = undefined ;
//switch to paste
phone_tools_set("tool-paste") ;
phone_tools_set("phone-tool-paste") ;
//do not handle the event further up
evt.stopPropagation() ;
}
......@@ -732,7 +732,7 @@ function pgm_cut(evt) {
el.parentElement.removeChild(el) ;
pgm_context.container = undefined ;
//switch to paste
phone_tools_set("tool-paste") ;
phone_tools_set("phone-tool-paste") ;
//do not handle the event further up
evt.stopPropagation() ;
}
......@@ -757,7 +757,7 @@ function pgm_paste(evt) {
clone_elt.addEventListener("click", mobile_pgm_click) ;
mobile_activate_blocks(clone_elt) ;
//switch to add
phone_tools_set("tool-add") ;
phone_tools_set("phone-tool-add") ;
//do not handle the event further up
evt.stopPropagation() ;
}
......@@ -864,10 +864,7 @@ function mobile_activate_blocks(el) {
//list pgm-commands and activate them
var pgm_commands = el.getElementsByClassName('pgm-command') ;
for(var i = 0; i < pgm_commands.length; ++i) {
//commands inside receivers are not to be activated
if(pgm_commands[i].parentElement.className.match(/pgm-recv-void/)) {
pgm_commands[i].addEventListener("click", mobile_pgm_click) ;
}
pgm_commands[i].addEventListener("click", mobile_pgm_click) ;
}
//list the inputs in the element (normally only one) and activate them
var pgm_inputs = el.getElementsByTagName('input') ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment