How do I inroduce foreign capital gains and losses in the Foreign Tax Credit (FTC) for 1116?

I had some stocks in a foreign country, some of of them I sold

Per other posts,  I have to use the Worksheet A (in my case) of 1116 instructions to calculate the adjusted capital gain or capital losses that I have to use for that section, and they'll go to 1116. Sometimes the worksheet tells me I have have some capital gains that go to line 1a, sometimes that I have capital losses that go to line 5

 

I go to the Foreign Tax Credit section, passive category and the right country.

For capital gains, it looks I have to introduce them when Turbo Tax asks me for ' Other Gross Income'

For capital losses, it looks I have to introduce them when Turbo Tax asks me for ' Foreign Losses' (as a positive number).

 

What puzzles me is that Turbo Tax allows me to fill both, but according to the worksheet A, I can only have capital gains or capital losses. Is it a bug on TurboTax, that should allow me to fill only either one or the other?

 

Also, one section asks me for ' 'Foreign qualified dividends and lt capital gains'. When I introduced this quantity, it's used correctly to calculate the amount on 1a as qualified dividends adjustment (by reducing qualified dividends by a factor, as instructed in 1116). But why does it ask for 'lt capital gains'? Per 1116,  capital gains are adjusted differently (whether ST or LT).

 

IF those are just little glitches on TurboTax, it would be nice to fixe them, but please clarify in the mean time.