skin.setfocus does not work in onfocus handler (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    MediaPortal Version: 1.4.0

    Description
    And 1.4 also

    If you setup a field that may receive focus and has an <onfocus> handler with a setfocus method in it the focus will only "partly" move. If you have the following buttons set up:
    XML:
    <control><type>button</type><id>10</id><ondown>11</ondown></control>
    <control><type>button</type><id>11</id><onfocus>#(skin.setfocus(35,12))</onfocus></control>
    <control><type>button</type><id>12</id></control>
    1. Button 10 looses focus
    2. Button 11 is marked with focus
    3. Button 12 is marked with focus
    4. Button 11 controls the focus

    After that focus is erratic and not nesc. controlled by onxxx methods.
    View attachment 130500 View attachment 130501 View attachment 130502 View attachment 130503

    Steps to Reproduce:
    XML:
    <control Style="debugGroupStyle">
    			<visible>true</visible>
    			<description>Debug Controls</description>
    			<posX>800</posX>
    			<posY>500</posY>
    			<width>500</width>
    			<height>600</height>
    			<type>group</type>
    			<layout>StackLayout(Vertical,2,true)</layout>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<id>10</id>
    				<label>ID 10</label>
    				<ondown>11</ondown>
    			</control>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<id>11</id>
    				<label>ID 11</label>
    				<onfocus>#(skin.setfocus(35,12))</onfocus>
    				<onleft>14</onleft>
    			</control>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<id>12</id>
    				<label>ID 12</label>
    				<onleft>15</onleft>
    			</control>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<id>14</id>
    				<label>ID 14</label>
    				<ondown>10</ondown>
    			</control>
    			<control Style="debugControlStyle">
    				<type>button</type>
    				<id>15</id>
    				<label>ID 15</label>
    				<ondown>10</ondown>
    			</control>
    		</control>
     

    Attachments

    • 21-13-26.png
      21-13-26.png
      353.4 KB
    • 21-13-29.png
      21-13-29.png
      353.4 KB
    • 21-13-32.png
      21-13-32.png
      353.4 KB
    • 21-13-35.png
      21-13-35.png
      353.4 KB
    Last edited:

    Users who are viewing this thread

    Top Bottom