Explorar el Código

Change click behavior on articles

Before, when the user click on an article it closes even if he want to select text.
This behavior was not acceptable, so I changed it to close the article when cliking
on the article footer or in the article margins.

See #473
Alexis Degrugillier hace 12 años
padre
commit
117396f751
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      p/scripts/main.js

+ 3 - 0
p/scripts/main.js

@@ -604,6 +604,9 @@ function init_shortcuts() {
 
 
 function init_stream(divStream) {
 function init_stream(divStream) {
 	divStream.on('click', '.flux_header,.flux_content', function (e) {	//flux_toggle
 	divStream.on('click', '.flux_header,.flux_content', function (e) {	//flux_toggle
+		if ($(e.target).parents('.content').length > 0) {
+			return;
+		}
 		if ($(e.target).closest('.item.website, .item.link').length > 0) {
 		if ($(e.target).closest('.item.website, .item.link').length > 0) {
 			return;
 			return;
 		}
 		}