Arrow keys don't seem to be working in UITextView embed in UICollectionViewCell

When a

UITextView
(or UITextField) is inside a
UICollectionViewCell
, arrow keys don't seem to be working, pressing up/down/left/right won't move the cursor. However, arrow keys with a modifier key (alt/cmd) do work, for example, cmd + left would go to beginning of the line.

I'm having the similar view hierarchy(UITextView and UITextField inside the UICollectionViewCell) from my iPad application and the arrow keys works well till iOS 14. However, the same code fails to execute when tried with iOS 15.

I'm using "wantsPriorityOverSystemBehavior = true" to read/enable the arrow key presses with iOS 15 and this works well. The only problem is when the UITextView and UITextField is in edit mode. Everything works well except the arrow keys which results in the restricted cursor movements.

Any assistance on this will be greatly appreciated. Thank you in advance.

Arrow keys don't seem to be working in UITextView embed in UICollectionViewCell
 
 
Q