flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Anderson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLEX-35049) TextButton 'enabled=false' never works in HTML
Date Tue, 10 Jan 2017 20:43:58 GMT

     [ https://issues.apache.org/jira/browse/FLEX-35049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joel Anderson updated FLEX-35049:
---------------------------------
    Attachment: 2017_01_10__DisabledInputBead_SWF.jpg

I added some code to my test to check the different mouse events:

{code}
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
				xmlns:js="library://ns.apache.org/flexjs/basic" 
				xmlns:local="*" 
				xmlns:accessories="org.apache.flex.html.accessories.*"
				pageTitle="HelloWorld" xmlns:ns="library://ns.apache.org/flexjs/html5">
			   
	<fx:Declarations>
	</fx:Declarations>
	
	<fx:Script>
		<![CDATA[
		
		// Changing the enable/disable state by script
		protected function textbutton1_clickHandler(event:org.apache.flex.events.MouseEvent):void
		{
			disabledBead.enabled = !disabledBead.enabled;
		}
		
		private function rollOverHandler(event:MouseEvent):void
		{
            statusLabel.text = "Roll Over";
        }

        private function rollOutHandler(event:MouseEvent):void
		{
            statusLabel.text = "Roll Out";
        }


        public function mouseDownHandler(event:MouseEvent):void
        {
            statusLabel.text = "Mouse Down";
        }

        public function mouseMoveHandler(event:MouseEvent):void
        {
            statusLabel.text = "Mouse Move";
        }

        public function mouseUpHandler(event:MouseEvent):void
        {
            statusLabel.text = "Mouse Up";
        }

        public function clickHandler(event:org.apache.flex.events.MouseEvent):void
        {
            statusLabel.text = "Click";
        }
			
		]]>
	</fx:Script>
	
	<js:valuesImpl>
		<js:SimpleCSSValuesImpl />
	</js:valuesImpl>
	
	<js:initialView>
		<js:View>
			<js:Container width="100%" height="100%" >
				<js:beads>
					<js:VerticalLayout />
				</js:beads>
				<js:Label id="lbl" text="Hello World" width="200" />
				<js:TextInput id="myTI2" text="Hello FlexJS!"
				   		rollOver="rollOverHandler(event)"
					    rollOut="rollOutHandler(event)"
					    mouseDown="mouseDownHandler(event)"
					    mouseMove="mouseMoveHandler(event)"
					    mouseUp="mouseUpHandler(event)"
					    click="clickHandler(event)"
						>
					<js:beads>
						<js:PNDisabledInputBead id="disabledBead" enabled="false"/>
						<!--<js:DisableBead disabled="true" />-->
					</js:beads>
				</js:TextInput>
				<js:TextButton text="Enable/Disable input field"
							click="textbutton1_clickHandler(event)"/>
				<js:Label id="statusLabel" text="" />
			</js:Container>	
		</js:View>
	</js:initialView>
	
 </js:Application>
{code}

When testing with the Javascript build, I found that the only event that still triggered was
mouseMove.

I also tested with an SWF build, and I found that the events were *not* disabled, and the
appearance did not look like I expected (there is still a lot of white near the text input
border.:
!2017_01_10__DisabledInputBead_SWF.jpg!


> TextButton 'enabled=false' never works in HTML
> ----------------------------------------------
>
>                 Key: FLEX-35049
>                 URL: https://issues.apache.org/jira/browse/FLEX-35049
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FlexJS
>    Affects Versions: Apache FlexJS 0.5.0
>            Reporter: Devsena
>              Labels: WrappedSprite
>         Attachments: 2017_01_10__DisabledInputBead_SWF.jpg, PNDisabledInputBead.as
>
>
> <js:ToggleTextButton/> or <js:TextButton/> 'enabled' property never works
when output as HTML. Buttons are anyway clickable even when 'enabled=false'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message