19 Nov 2019 - TVDB are still in the process of fixing a number of bugs that have broken the TVDB scraper and any add-on that relies on TVDB data. TVDB are still working to rectify the problems.

Container of static items default focus on second item?
#1
Hey,
I've got a container set with static items as its content.
For some weird reason Kodi insists on focusing the second item in the container as default.
I can't use 'defaultfocus' attribute because it also consists of dynamic items and it doesn't seem to work in conjunction (if dynamic items are not added as content it still puts focus on second item).

To clarify, when testing this container with just changing content to plugin based/xsp based, its default focus is on the first item, so i'm not sure how an excerpt of the specific code can be helpful here, it seems more of a global issue...

Ideas?
Reply
#2
No idea but was hoping you were working on this. Your Categories widget is my only widget that doesn't have the slim list on the left on startup. Just thought I would help out by bumping this to the top where someone who might know will see it.
Running Leia Titan Bingie skin on Nvidia Shield to Vizio 50in HD TV in living room. Same setup on Xiaomi Mi boxes in my bedroom and home gym. Same setup in camper with a 24in tv, HTC 10 android cell phone. Kodi and Plex Server Dell Inspirion 5575 Ryzen 5 HTPC Windows 10 with 5TB external HDD
Reply
#3
i assume its multiple content.

May its focused the first 'visible' item.

did you test with

Quote:control.setfocus(**),0,absolute

?
Skins                                                                                        
Reply
#4
(2019-06-26, 20:39)mardukL Wrote: i assume its multiple content.

May its focused the first 'visible' item.

did you test with

Quote:control.setfocus(**),0,absolute

?

Yeah of course but I want to solve the root problem and not patch it. Also, I can't really use this method specifically since I don't know upfront which id the container will be assigned with...
Reply
#5
(2019-06-26, 21:46)cartman.dos Wrote:
(2019-06-26, 20:39)mardukL Wrote: i assume its multiple content.

May its focused the first 'visible' item.

did you test with

Quote:control.setfocus(**),0,absolute

?

Yeah of course but I want to solve the root problem and not patch it. Also, I can't really use this method specifically since I don't know upfront which id the container will be assigned with...

can you post a code snippet?

i assume that you have

<content>a</content>
<content>b</content>

in one container.

where content b is faster visible than a.

that is why b gets focused first.

but just thinking ;-)

other solution would a control.move(**,-1)

as onload action if possible
Skins                                                                                        
Reply
#6
(2019-06-27, 03:38)mardukL Wrote:
(2019-06-26, 21:46)cartman.dos Wrote:
(2019-06-26, 20:39)mardukL Wrote: i assume its multiple content.

May its focused the first 'visible' item.

did you test with


?

Yeah of course but I want to solve the root problem and not patch it. Also, I can't really use this method specifically since I don't know upfront which id the container will be assigned with... 

can you post a code snippet?

i assume that you have

<content>a</content>
<content>b</content>

in one container.

where content b is faster visible than a.

that is why b gets focused first.

but just thinking ;-)

other solution would a control.move(**,-1)

as onload action if possible 
Code:

<include>StaticWidget_Categories</include>
<content sortby="$PARAM[widgetSortBy]" sortorder="$PARAM[widgetSortOrder]" limit="$PARAM[widgetLimit]" target="$PARAM[widgetTarget]">plugin://script.skin.helper.widgets/?action=browsegenres&amp;mediatype=media</content>

The include definition is for example:
Code:

<content>
    <item id="1">
        <label>$LOCALIZE[31532]</label>
        <thumb>bingie/categories/topratedmovies.jpg</thumb>
        <property name="DBTYPE">category</property>
        <property name="path">special://skin/playlists/topratedmovies.xsp</property>
       <onclick>ActivateWindow(Videos,special://skin/playlists/topratedmovies.xsp,return)</onclick>
       <visible>true</visible>
    </item>

...
</content>

So the faster one is actually first, also for control.move I need an id upfront, unless I'm using something like sualfred's resetposition method, which i can  provide a long list of possible ids, but still not ideal :/
Reply
#7
Seems to be a gui engine bug when using focusposition with static items, issue has been reported.
16348 (GH issue)
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Container of static items default focus on second item?00