Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16823] iOS: DocumentViewer is not able to hide/dismiss OptionsMenu

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2014-08-04T17:30:06.000+0000
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsiOS
LabelsCase00001485, supportTeam
ReporterEduardo Gomez
AssigneeSabil Rahim
Created2014-04-07T22:40:08.000+0000
Updated2017-03-20T20:35:08.000+0000

Description

Issue description

Once the Ti.UI.iOS.DocumentViewer is shown, is not able to hide or dismiss the OptionsMenu unless you select one of the options. Tapping outside the popover area does not hide it.

Steps to reproduce

Run sample code below

Tap Button to invoke DocumentViewer.show()

Attempt to dismiss OptionsMenu

var file = 'doc.pdf';

var win = Ti.UI.createWindow();
var webview = Ti.UI.createWebView({
	url : 'http://www.appcelerator.com'
});
win.add(webview);

var view = Ti.UI.createView({
	height : 40,
	borderColor : 'red',
	width : Ti.UI.FILL
});

var winButton = Ti.UI.createView({
	height : 40,
	backgroundColor : 'red',
	width : 200,
	top : 270,
	top : 0
});

//workaround
//view.add(winButton);
//win.add(view);
//end of work around

win.add(winButton);//comment out when using work around

// Create a document viewer to preview a PDF file
var docViewer = Ti.UI.iOS.createDocumentViewer({
	url : file
});

// The document viewer immediately launches without an animation
winButton.addEventListener('click', function() {
	docViewer.show({
		view : winButton,
		animated : true
	});
	Ti.API.error('clicked');
});

win.open();

Comments

  1. Sabil Rahim 2014-08-04

    Looks this a issue with web view where web view consumes all the click events. If you set touchEnabled to false then this sample would work.
       var webview = Ti.UI.createWebView({
           url : 'http://www.appcelerator.com',
           touchEnabled: false
       });
       
    Marking ticket as won't fix as this is a issue we constantly face the same problem with WebView.
  2. Lee Morris 2017-03-20

    Closing ticket as the issue will not fix.

JSON Source