summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6003b88)
Without this fix, clicking element without direct text child element but
with children containing text nodes resulted in selecting this
child text element (while visual indication for the user was that the
requested element was selected).
if(byBrowser && byBrowser.parent().sameNode(nodeToLand)) {
return byBrowser;
}
if(byBrowser && byBrowser.parent().sameNode(nodeToLand)) {
return byBrowser;
}
- return e.getVerticallyFirstTextElement();
+ return e.getVerticallyFirstTextElement({considerChildren: false});
}.bind(this);
var _markAsCurrent = function(element) {
if(element instanceof documentElement.DocumentTextElement) {
}.bind(this);
var _markAsCurrent = function(element) {
if(element instanceof documentElement.DocumentTextElement) {
- getVerticallyFirstTextElement: function() {
+ getVerticallyFirstTextElement: function(params) {
+
+ params = _.extend({
+ considerChildren: true
+ }, params);
+
this.children().some(function(child) {
if(child instanceof documentElement.DocumentTextElement) {
toret = child;
return true; // break
this.children().some(function(child) {
if(child instanceof documentElement.DocumentTextElement) {
toret = child;
return true; // break
+ } else if(params.considerChildren) {
toret = child.getVerticallyFirstTextElement();
if(toret) {
return true; // break
toret = child.getVerticallyFirstTextElement();
if(toret) {
return true; // break