зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1536819 - Fix node.offsetParent is null error in Rule View r=gl
The editing of selectors in the rule view is broken (see https://bugzil.la/1536867) but that is not related to this issue. Differential Revision: https://phabricator.services.mozilla.com/D24210 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d2f2f6fd29
Коммит
3f627acfe1
|
@ -450,15 +450,10 @@ CssRuleView.prototype = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Retrieve the RuleEditor instance that should be stored on
|
||||
* the offset parent of the node
|
||||
* Retrieve the RuleEditor instance.
|
||||
*/
|
||||
_getRuleEditorForNode: function(node) {
|
||||
if (!node.offsetParent) {
|
||||
// some nodes don't have an offsetParent, but their parentNode does
|
||||
node = node.parentNode;
|
||||
}
|
||||
return node.offsetParent._ruleEditor;
|
||||
return node.closest(".ruleview-rule")._ruleEditor;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче