aruponse / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

getEventTargetType() does not recognize the target type if the element has additional classes #369

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add some other class to dynatree-title node, for example in custom rendering.
2. node.getEventTargetType(event) will return null, when for example, clicking 
on the node title

This is because getEventTargetType treats target.className as single class 
name, when it actually can contain several.

I've attached a quick patch to make it support multiple classes, but it's not 
very efficient approach.

Maybe reverting the tree.options.classNames to make a class name => type map 
and then iterating over target.className.split(/\s+/) to get the type would be 
better and cleaner.

Original issue reported on code.google.com by Pami.Ketolainen on 2 Nov 2012 at 12:07

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 2 Nov 2012 at 7:30

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 10 Feb 2013 at 8:42

GoogleCodeExporter commented 9 years ago
1.2.4 was a hotfix

Original comment by moo...@wwwendt.de on 12 Feb 2013 at 9:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r678.

Original comment by moo...@wwwendt.de on 8 Sep 2013 at 7:01

GoogleCodeExporter commented 9 years ago
Issue 421 has been merged into this issue.

Original comment by moo...@wwwendt.de on 8 Sep 2013 at 7:32