{ "id": "163771", "key": "TIMOB-23992", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-11-28T09:01:35.000+0000", "created": "2016-10-06T15:02:34.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "52997", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "125684", "key": "TIMOB-16369", "fields": { "summary": "Android: Disable copy,define,share popup contextual bar inside webview when selecting text", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-08T15:53:05.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Hi...\r\n\r\nIn webView when selecting the content or text a default popup menu gets appeared with the options copy, define, share etc.\r\n\r\nIs it possible to remove this option without blocking webview text selection? Also, add some new menu option?\r\n\r\n\r\n---\r\n\r\nWe should add a boolean property to disable the default set of context actions in the action bar. We may *also* want to allow disable text selection altogether.\r\n\r\n{code:js}\r\nvar webView = Ti.UI.createWebView({\r\n disableTextSelection: false,\r\n disableContextMenu: true\r\n});\r\n{code}", "attachment": [ { "id": "61182", "filename": "screenshot-1.png", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-01-05T17:08:57.000+0000", "size": 9448, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Disable context menu inside webview when selecting text", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jignesh.igp", "key": "jignesh.igp", "displayName": "Jignesh Kasundra", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android, iOS", "closedSprints": [ { "id": 758, "state": "closed", "name": "2016 Sprint 24 SDK", "startDate": "2016-11-19T01:32:06.991Z", "endDate": "2016-12-03T01:32:00.000Z", "completeDate": "2016-12-05T01:53:38.311Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "398413", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8488", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-07T21:58:48.000+0000", "updated": "2016-10-07T22:01:39.000+0000" }, { "id": "398414", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I added the two methods. However, we have a problem here:\r\n- If the user set {{disableTextSelection}} to {{true}} and {{disableContextMenu}} to {{false}}, the context menu is not shown because it depends on the text selection\r\n- If the user set {{disableTextSelection}} to {{false}} and {{disableContextMenu}} to {{true}}, both the context menu and the text selection is shown\r\n\r\nAnd that looks like an internal iOS behavior, because selecting an action without selecting a text does not make sense and selecting a text without presenting actions does not make sense as well. \r\n\r\n[~cwilliams] please advice what you thing is the best solution here. We either leave a note in the docs regarding this behavior (already done for the first use-case) or make {{disableContextMenu}} Android-only and handle both in {{disableTextSelection). I would prefer the first proposal. Thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-07T22:14:28.000+0000", "updated": "2016-10-07T22:14:28.000+0000" }, { "id": "401551", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR to fix the selection for device-builds as well: https://github.com/appcelerator/titanium_mobile/pull/8629", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-18T19:18:56.000+0000", "updated": "2016-11-18T19:18:56.000+0000" }, { "id": "404155", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Tested various true/false combinations of the {{disableContextMenu}} & {{disableTextSelection}} properties for both iOS device and Simulators:\r\n\r\n!screenshot-1.png!\r\n\r\nThe results show that the contextMenu can now be correctly disabled on device builds, however it was found that in any case where the contextMenu is accessible, text selection is also accessible, regardless of {{disableTextSelection}} being set to true. From what I've observed, it seems that the property has no actual effect. [~hansknoechel] can you shed some light on whether this is the intended behavior? \r\n\r\nTested On:\r\niPhone 7 10.2 Device & Simulator\r\nMac OS Sierra (10.12.2)\r\nTi SDK:6.1.0.v20170101113815\r\nAppc Studio: 4.8.0.201611121409\r\nAppc NPM: 4.2.8\r\nApp CLI: 6.1.0-319\r\nXcode 8.2.1\r\nNode v4.4.7\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-01-05T17:14:43.000+0000", "updated": "2017-01-05T17:14:43.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }