mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 12:21:26 +02:00
Fix click handler on links does not stop propagation, causes unwanted click event
This commit is contained in:
parent
7742f9316b
commit
3be8c38c0d
@ -1147,8 +1147,9 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
if(_value.id && _value.app)
|
if(_value.id && _value.app)
|
||||||
{
|
{
|
||||||
this.link.addClass("et2_link");
|
this.link.addClass("et2_link");
|
||||||
this.link.click( function(){
|
this.link.click( function(e){
|
||||||
self.egw().open(_value, "", "view",null,_value.app,_value.app);
|
self.egw().open(_value, "", "view",null,_value.app,_value.app);
|
||||||
|
e.stopImmediatePropagation();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1344,7 +1345,10 @@ var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
var link = $j(document.createElement("li"))
|
var link = $j(document.createElement("li"))
|
||||||
.appendTo(this.list)
|
.appendTo(this.list)
|
||||||
.addClass("et2_link loading")
|
.addClass("et2_link loading")
|
||||||
.click( function(){self.egw().open(_link_data, "", "view",null,_link_data.app,_link_data.app);});
|
.click( function(e){
|
||||||
|
self.egw().open(_link_data, "", "view",null,_link_data.app,_link_data.app);
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
});
|
||||||
|
|
||||||
if(_link_data.title) link.text(_link_data.title);
|
if(_link_data.title) link.text(_link_data.title);
|
||||||
|
|
||||||
|
@ -134,6 +134,10 @@ function egwPopupActionImplementation()
|
|||||||
ai._registerDefault = function(_node, _callback, _context)
|
ai._registerDefault = function(_node, _callback, _context)
|
||||||
{
|
{
|
||||||
var defaultHandler = function(e) {
|
var defaultHandler = function(e) {
|
||||||
|
// Prevent bubbling bound event on <a> tag, on touch devices
|
||||||
|
// a tag should be handled by default event
|
||||||
|
if (egwIsMobile && e.target.tagName == "A") return true;
|
||||||
|
|
||||||
if (typeof document.selection != "undefined" && typeof document.selection.empty != "undefined")
|
if (typeof document.selection != "undefined" && typeof document.selection.empty != "undefined")
|
||||||
{
|
{
|
||||||
document.selection.empty();
|
document.selection.empty();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user