Rg.plugins.popup: Keyboard offset not working with Version 2.0.0.7 or newer

Created on 19 Dec 2020  路  6Comments  路  Source: rotorgames/Rg.Plugins.Popup

馃悰 Bug Report

Expected behavior

Keyboard offset should work and resize the page with the padding height of keyboard

Reproduction steps

  1. Set HasKeyboardOffset to true
  2. Add Entry, Picker or something similar to the page
  3. Focus it and the bug will occur

Configuration

Version of Xamarin: 4.8.0.1821 (latest stable release)
Version of the plugin: 2.0.0.7 or newer

Platform:

  • [x] :iphone: iOS
  • [ ] :robot: Android
  • [ ] :checkered_flag: WPF (not testet)
  • [ ] :earth_americas: UWP (not testet)
  • [ ] :apple: MacOS (not testet)
  • [ ] :tv: tvOS (not testet)
  • [x] :monkey: Xamarin.Forms

Sample:

TestApp - Popup Issue Sample.zip

confirmed

Most helpful comment

New nuget is up now

All 6 comments

Is there any progress or a solution? 2.0.0.6 isn't compatible with Xamarin.Forms 5+ and popups are important for us..

We could determine that if you remove the if statement in line 64 in the PlatformExtension.cs file it will work as expected. Maybe this will help to fix this issue.

hey @WorldOfBasti I think I found it.

Line 64 was added in to make XF 5.0 work (a pre-release of it anyway), so while removing it does make XF4.8 work smooth, it does suffer the same original bug as #589. So I had to keep it in.

the fix was related however (good catch), adding an extra condition for the system padding changing, which is what the keyboard offset works with, allowed it to work. Line 64 is now

  if ((renderer.Element.Width != superviewFrame.Width && renderer.Element.Height != superviewFrame.Height)
      || currentElement.SystemPadding.Bottom != systemPadding.Bottom)
  {

I have a branch patch-#625, do you mind giving it a whirl in your project and see if it helps out? if it does I'll merge it in

Hello @LuckyDucko,
Yes I can confirm with this works it as expected.

Hello, when is the new version with this fix expected to be available on NuGet?

only @martijn00 has control concerning the NuGets, I'll close this ticket when he pushes one out

New nuget is up now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YZahringer picture YZahringer  路  4Comments

genilsonmm picture genilsonmm  路  3Comments

luis-barreira picture luis-barreira  路  5Comments

VladislavAntonyuk picture VladislavAntonyuk  路  3Comments

widiarifki picture widiarifki  路  5Comments