Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117199

Changing button graphic via css breaks the button behavior

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.1
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:
    • Environment:

      2.1-b14

      Description

      In my app I change button graphic for hover and armed button states:

      .button:hover {
          -fx-graphic: url("hover.png");
      }

      .button:armed {
          -fx-graphic: url("armed.png");
      }

      When I press and release mouse button outside of the graphic bounds I get correct change of button image according to hover/armed events.
      When I do the same with the mouse cursor within the graphic bounds it all gets broken and starts to behave as if the button just toggles between armed and hover states.

        Attachments

        1. armed.png
          armed.png
          1 kB
        2. Bug.css
          0.3 kB
        3. Bug.java
          1 kB
        4. hover.png
          hover.png
          1 kB

          Activity

            People

            • Assignee:
              kwwong Kinsley Wong
              Reporter:
              mrkam Alexander Kuznetcov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: