fix(android): CSS style not working properly in modal pages (#10070)

This commit is contained in:
Douglas Machado
2022-11-04 01:21:57 -03:00
committed by Nathan Walker
parent 6f1a5d16e3
commit 95c3b3026d

View File

@@ -3,7 +3,7 @@ import { isCssVariable } from '../../core/properties';
import { isNullOrUndefined } from '../../../utils/types'; import { isNullOrUndefined } from '../../../utils/types';
import * as cssParser from '../../../css'; import * as cssParser from '../../../css';
import { Combinator as ICombinator , SimpleSelectorSequence as ISimpleSelectorSequence, Selector as ISelector, SimpleSelector as ISimpleSelector, parseSelector} from '../../../css/parser'; import { Combinator as ICombinator, SimpleSelectorSequence as ISimpleSelectorSequence, Selector as ISelector, SimpleSelector as ISimpleSelector, parseSelector } from '../../../css/parser';
/** /**
* An interface describing the shape of a type on which the selectors may apply. * An interface describing the shape of a type on which the selectors may apply.
@@ -11,6 +11,7 @@ import { Combinator as ICombinator , SimpleSelectorSequence as ISimpleSelectorSe
*/ */
export interface Node { export interface Node {
parent?: Node; parent?: Node;
_modalParent?: Node;
id?: string; id?: string;
nodeName?: string; nodeName?: string;
@@ -384,7 +385,7 @@ export class Selector extends SelectorCore {
return !!node; return !!node;
} else { } else {
let ancestor = node; let ancestor = node;
while ((ancestor = ancestor.parent)) { while ((ancestor = ancestor.parent ?? ancestor._modalParent)) {
if ((node = group.match(ancestor))) { if ((node = group.match(ancestor))) {
return true; return true;
} }