Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-27951

Non-inherited styles are missing on pop-up components

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Adobe Flex SDK Next
    • Fix Version/s: None
    • Component/s: Styles
    • Labels:
      None
    • Environment:
      Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Other (specify version)
      Language Found: English

      Description

      Steps to reproduce:
      1. Create the following application and run

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
      <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
      <fx:Style>
      @namespace s "library://ns.adobe.com/flex/spark";
      @namespace mx "library://ns.adobe.com/flex/mx";
      .myRedStyle

      { chromeColor: #FF0000; }

      s|Button

      { fontStyle: italic; }

      s|PopUpAnchor

      { color: #0000FF; }

      s|PopUpAnchor s|Button

      { textDecoration: underline; }

      </fx:Style>
      <s:layout>
      <s:VerticalLayout/>
      </s:layout>
      <s:HGroup>
      <s:Button id="openButton" label="Open" click="pua.displayPopUp = !pua.displayPopUp"/>
      <s:PopUpAnchor id="pua" top="0" left="0" right="0" bottom="0">
      <s:Button label="Button in PopUpAnchor using myRedStyle" styleName="myRedStyle"/>
      </s:PopUpAnchor>
      </s:HGroup>
      <s:Button label="Using myRedStyle" styleName="myRedStyle"/>
      </s:Application>

      2. Click on the "Open" button
      3. Observe styles applied

      Actual Results:
      Only simple type selector styles are applied:

      1) s|Button (italic)
      2) s|PopUpAnchor inherited style (blue text)

      Expected Results:
      The Button inside the PopUpAnchor should also have:

      3) .myRedStyle (chromeColor red)
      4) s|PopUpAnchor s|Button descendant selector style (underline text)

      Workaround (if any):
      For #3, you could assign .myRedStyle as the styleName of the PopUpAnchor.
      For #4, this may be a fact-of-life since the PopUpAnchor is not the parent of the Button at runtime.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adobejira Adobe JIRA
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: