Skip to content

Conversation

@bbrto21
Copy link

@bbrto21 bbrto21 commented Sep 20, 2022

  • When Unfocus() is called, the view no longer handles key-events. As a result the keyboard focus can be removed from the view.
  • Now, if a backkey is pressed when the navigation stack is empty, the view loses keyboard focus by Platform channel with TizenViewElementary.

Signed-off-by: Boram Bae boram21.bae@samsung.com

* When Blur() is called, the view no longer handles key-events.
  As a result the keyboard focus can be removed from the view.
* Now, if a backkey is pressed when the navigation stack is empty,
  the view loses keyboard focus by Platform channel with TizenViewElementary.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@swift-kim
Copy link
Member

Maybe BlurUnfocus for clarity?

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21 bbrto21 changed the title Add TizenView::Blur() method Add TizenView::Unfocus() method Sep 20, 2022
@bbrto21
Copy link
Author

bbrto21 commented Sep 20, 2022

Maybe BlurUnfocus for clarity?

Ok, I updated PR as your comment.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
}

void TizenViewNui::Unfocus() {
FT_UNIMPLEMENTED();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this difficult to implement?

Copy link
Author

@bbrto21 bbrto21 Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see. nui implementation is quite different from elementary implementation.
I don't know much about this yet, and I have to study it. I need more time for this. so I want to leave this part for next PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since NUI's TouchEvent Callback is located in flutter-tizen, it should be implemented with flutter-tizen(with additional APIs(?)). I will check after this patch is applied.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should finalize the design before applying this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, then, it seems that the Unfocus() method and the focused member should be implemented in TizenView.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JSUYA I moved them to TIzenView

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a PR applicable to NUIView. (#354)
I changed Unfocus() to SetFocus(bool f) because there are cases where I need to make focused_ true.

@swift-kim swift-kim linked an issue Sep 21, 2022 that may be closed by this pull request
* Tidy up based on review.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21 bbrto21 merged commit e72a4b2 into flutter-tizen:flutter-3.3.0-tizen Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a way to release focus from the view

3 participants