Merge "MobileArticleTarget: don't access the surface after it's destroyed"

This commit is contained in:
jenkins-bot 2019-09-09 16:35:18 +00:00 committed by Gerrit Code Review
commit 03bdace1ba

View file

@ -241,7 +241,7 @@ ve.init.mw.MobileArticleTarget.prototype.onContainerScroll = function () {
ve.init.mw.MobileArticleTarget.prototype.onSurfaceScroll = function () {
var nativeSelection, range;
if ( ve.init.platform.constructor.static.isIos() ) {
if ( ve.init.platform.constructor.static.isIos() && this.getSurface() ) {
// iOS has a bug where if you change the scroll offset of a
// contentEditable or textarea with a cursor visible, it disappears.
// This function works around it by removing and reapplying the selection.