draft-js icon indicating copy to clipboard operation
draft-js copied to clipboard

onBlur is not called when blur is triggered via the ‘collapsed address bar’ in iOS15 Safari

Open timohofmeijer opened this issue 4 years ago • 1 comments

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?

In Safari on iOS 15 with the ‘Bottom Address Bar’ enabled, when the soft-keyboard becomes active, a collapsed version of the address bar (collapsed-address-bar) sits on top of the keyboard. When blurring a draft editor by tapping on this collapsed-address-bar, onBlur will not get called.

When pressing the Done button in the bar, right above soft-keyboard, onBlur is called though 🤔.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  • open in a draft-js editor in Safari on iOS 15
  • log the onBlur handler
  • make sure the ‘Bottom Address Bar’ is turned on (tap the ᴀA icon and select ‘Show Bottom Address Bar’
  • blur the draft editor by tapping on the collapsed-address-bar, note that nothing is logged
  • now blur the draft editor by tapping outside the element or by tapping the ‘Done’ button above the keyboard, onBlur will be logged

What is the expected behavior?

For onBlur to get called when blurring the editor in any way possible, including by tapping the collapsed address-bar.

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?

Draft-js version 0.11.7 Mobile Safari, tested on a physical iPhone 11 running iOS 15.01 and the iPhone simulator running iOS 15.0

timohofmeijer avatar Oct 14 '21 12:10 timohofmeijer

I am also facing the same issue !

faran4hatch avatar Mar 16 '22 23:03 faran4hatch