Opened 4 years ago

Last modified 4 years ago

#15612 new bug

B_LEFT_ARROW and B_RIGHT_ARROW are not invoked when a TextView is focused

Reported by: Paradoxon Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc: kapix
Blocked By: Blocking:
Platform: All

Description (last modified by Paradoxon)

MenuEntries with B_LEFT_ARROW or B_RIGHT_ARROW will stop working as soon as a TextView has a Focus.

e.g. if you are in the url textfield of WebPositive forward and backward navigation in history will stop working.

Not sure what the default behaviour should be.. but some apps the MenutItems stoped working like ScriptureGuide, FlyingTroll (never heard of this behaviour..:-) And WebPositive if the URL field is selected :-D.

Change History (6)

comment:1 by KapiX, 4 years ago

I don't see how my change could cause the behavior you describe. Yes, it touches the code that probably does (a dozen lines up there are B_LEFT/RIGHT_ARROW shortcuts being installed), but it was there already. Perhaps HasShortcut does not take Menu shortcuts into account - although I don't see any obvious problems in its logic.

comment:2 by diver, 4 years ago

Component: Servers/app_serverKits/Interface Kit
Description: modified (diff)
Owner: changed from axeld to nobody
Summary: B_LEFT_ARROW and B_RIGHT_ARROW are not invoked when a Textview is focused since wordwise updateB_LEFT_ARROW and B_RIGHT_ARROW are not invoked when a TextView is focused

in reply to:  1 comment:3 by Paradoxon, 4 years ago

Replying to KapiX:

I don't see how my change could cause the behavior you describe. Yes, it touches the code that probably does (a dozen lines up there are B_LEFT/RIGHT_ARROW shortcuts being installed), but it was there already. Perhaps HasShortcut does not take Menu shortcuts into account - although I don't see any obvious problems in its logic.

So sorry.. my investigation was totaly wrong.. But i know that it was working back in the days .... The question is why are the Shortcuts working if no TextView is added (if i comment it out in the code i will recive the Message in MessageRecived)

HasShortcut normaly take the MenuItem Shortcuts into Account...

I will try to look into it closer.. sorry for blaming you.

comment:4 by Paradoxon, 4 years ago

Description: modified (diff)

comment:5 by ttcoder, 4 years ago

Sorry for the "drive-by commenting", but any chance that lines like this one are relevant? : https://xref.landonf.org/source/xref/haiku/src/kits/interface/TextView.cpp#5178

in reply to:  5 comment:6 by Paradoxon, 4 years ago

Replying to ttcoder:

Sorry for the "drive-by commenting", but any chance that lines like this one are relevant? : https://xref.landonf.org/source/xref/haiku/src/kits/interface/TextView.cpp#5178

Thank you for investigating ... :-)

Thanks

Actually that could be the solution... since it removes the ARROW Shortcuts and since its called in void BTextView::WindowActivated(bool active) but actually it is normally checking fInstalledNavigateCommandWordwiseShortcuts so if the TextView installed this shortcuts... i think i need somehow to check if its called with active false or IsFocus() false and fActive is true :) somewhen on startup.... But actually once the Texfield get losing focus ... it will also delete all Arrow Shortcuts so maybe the fInstalledNavigateCommandWordwiseShortcuts isnt set correctly..

Because i made some test... adding the Textvield only after the Windows is active... then the BMenu Shortcuts will work... but only as long as the TextView (content) isnt updated...

Last edited 4 years ago by Paradoxon (previous) (diff)
Note: See TracTickets for help on using tickets.