Bug Tracker

Modify

Ticket #11319 (closed bug: invalid)

Opened 16 months ago

Last modified 16 months ago

Incompatibility between 1.6.3 and 1.6.4

Reported by: davidleonardochacon@… Owned by:
Priority: low Milestone: None
Component: misc Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

Hi I use prime faces 3.1 and I need run the follow code: function getX( oElement ) {

var iReturnValue = 0; while( oElement != null ) {

iReturnValue += oElement.offsetLeft; oElement = oElement.offsetParent;

} return iReturnValue;

}

function rgb2hex(rgb) {

rgb = rgb.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); function hex(x) {

return ("0" + parseInt(x).toString(16)).slice(-2);

} return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);

}

function getY( oElement ) {

var iReturnValue = 0; while( oElement != null ) {

iReturnValue += oElement.offsetTop; oElement = oElement.offsetParent;

} return iReturnValue;

}

$(document).ready(function() {

Muestra y oculta los menús $('ul.principal li').hover(

function(e) {

$("#main svg").remove(); var myItems = [] myItems.push('<svg>');

if ($(this).hasClass('principal li')) {

$(this).find('ul.secundario').css({

display: "block"

});

$(".principal li#idSecundario").each(function(){

if (!($(this).parent().css('display')=='none')){

var color=rgb2hex($(this).css('color'));

myItems.push('<path stroke="' + color +'" stroke-width="1" fill="none" d="M ' + (parseInt($(this).parent().parent().position().left) + parseInt( $(this).parent().parent().innerWidth())) +' '+(parseInt( $(this).parent().position().top) - 6) + ' ' + (parseInt($(this).position().left)) + ' ' + (parseInt($(this).position().top) + 6 ) + '"/>' );

}

});

}

if ($(this).hasClass('secundario li')) {

$(this).find('ul.tercero').css({

display: "block"

});

$(".principal li#idTercero").each(function(){

if (!($(this).parent().css('display')=='none')){

var color=rgb2hex($(this).css('color'));

myItems.push('<path stroke="' + color +'" stroke-width="1" fill="none" d="M ' + (parseInt($(this).parent().parent().position().left) + parseInt( $(this).parent().parent().innerWidth())) +' '+(parseInt( $(this).parent().position().top) - 6) + ' ' + (parseInt($(this).position().left) + parseInt( $(this).innerWidth())) + ' ' + (parseInt($(this).position().top) + 6) + '"/>' );

}

});

}

if ($(this).hasClass('tercero li')) {

$(this).find('ul.cuarto').css({

display: "block"

});

$(".principal li#idCuarto").each(function(){

if (!($(this).parent().css('display')=='none')){

var color=rgb2hex($(this).css('color'));

myItems.push('<path stroke="' + color +'" stroke-width="1" fill="none" d="M ' + (parseInt($(this).parent().parent().position().left) + parseInt( $(this).parent().parent().innerWidth())) +' '+(parseInt( $(this).parent().position().top) - 6) + ' ' + (parseInt($(this).position().left) ) + ' ' + (parseInt($(this).position().top) + 6) + '"/>' );

}

});

}

myItems.push('</svg>');

$('#main').append(myItems.join());

}, function(e) {

$("#main svg").remove();

if ($(this).hasClass('principal li')) {

$(this).find('ul.secundario').css({

display: "none"

}); $('.principal').find('#linea').css({

display: "none"

});

} if ($(this).hasClass('secundario li')) {

$(this).find('ul.tercero'). css({

display: "none"

}); $('.principal').find('#linea').css({

display: "none"

});

} if ($(this).hasClass('tercero li')) {

$(this).find('ul.cuarto'). css({

display: "none"

}); $('.principal').find('#linea').css({

display: "none"

});

}

} );

});

Primeface use 1.6.4 verson but scrit run with  http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"

I Neet Help

Change History

comment:1 Changed 16 months ago by sindresorhus

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to misc

Thanks for taking the time to try to contribute to the jQuery project but this is not a valid bug. This bug tracker is not a support forum, and is only for solving reproducible, verifiable bugs with jQuery Core itself.

If you require assistance with your code, try asking in the  forums, #jquery on Freenode, or on  StackOverflow.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.