René's URL Explorer Experiment


Title: `androidOverflowInset` applies padding even when insets are marked as consumed · Issue #11019 · NativeScript/NativeScript · GitHub

Open Graph Title: `androidOverflowInset` applies padding even when insets are marked as consumed · Issue #11019 · NativeScript/NativeScript

X Title: `androidOverflowInset` applies padding even when insets are marked as consumed · Issue #11019 · NativeScript/NativeScript

Description: Issue Description Bug: androidOverflowInset applies padding even when insets are marked as consumed When using androidOverflowEdge="dont-apply" and listening to the androidOverflowInset event, NativeScript automatically applies padding e...

Open Graph Description: Issue Description Bug: androidOverflowInset applies padding even when insets are marked as consumed When using androidOverflowEdge="dont-apply" and listening to the androidOverflowInset event, Nati...

X Description: Issue Description Bug: androidOverflowInset applies padding even when insets are marked as consumed When using androidOverflowEdge="dont-apply" and listening to the androidOverflowInset e...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/11019

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`androidOverflowInset` applies padding even when insets are marked as consumed","articleBody":"### Issue Description\n\n**Bug:** `androidOverflowInset` applies padding even when insets are marked as consumed\n\nWhen using `androidOverflowEdge=\"dont-apply\"` and listening to the `androidOverflowInset` event, NativeScript automatically applies padding even when insets are marked as consumed. This is a runtime issue.\n\n**Expected behavior:**\n\nWhen `inset.topConsumed = true` (and similar for other edges) is set in the `androidOverflowInset` event handler, NativeScript should not apply padding, regardless of the original inset values.\n\n**Actual behavior:**\n\nNativeScript applies padding based on whether the original inset values were 0 (`leftPreviouslyConsumed`), not based on whether the insets are marked as consumed (`leftConsumed`). This happens in `LayoutBase.java` line 280:\n\n```java\nbase.setPadding(leftPreviouslyConsumed ? 0 : leftInset, topPreviouslyConsumed ? 0 : topInset, rightPreviouslyConsumed ? 0 : rightInset, bottomPreviouslyConsumed ? 0 : bottomInset);\n```\n\nThe code checks `leftPreviouslyConsumed` (whether the original value was 0) instead of `leftConsumed` (whether it was marked as consumed by the event handler).\n\n**Workaround:**\n\nThe current workaround is to set inset values to 0 AND mark them as consumed:\n\n```typescript\ninset.top = 0;\ninset.bottom = 0;\ninset.left = 0;\ninset.right = 0;\ninset.topConsumed = true;\ninset.bottomConsumed = true;\ninset.leftConsumed = true;\ninset.rightConsumed = true;\n```\n\nThis is counterintuitive because marking as consumed should be sufficient.\n\n**Proposed fix:**\n\nIn `LayoutBase.java` line 280, the code should check `leftConsumed` instead of (or in addition to) `leftPreviouslyConsumed`:\n\n```java\n// Current (buggy):\nbase.setPadding(leftPreviouslyConsumed ? 0 : leftInset, ...);\n\n// Should be:\nbase.setPadding((leftPreviouslyConsumed || leftConsumed) ? 0 : leftInset, ...);\n```\n\n**Related file:**\n- `packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/LayoutBase.java` (line 280)\n\n\n### Reproduction\n\n1. Create a Frame with `androidOverflowEdge=\"dont-apply\"`:\n\n```xml\n\u003cFrame id=\"rootFrame\" androidOverflowEdge=\"dont-apply\" loaded=\"onLoaded\" /\u003e\n```\n\n2. Listen to the `androidOverflowInset` event and mark insets as consumed without setting their values to 0:\n\n```typescript\nexport function onLoaded(args: EventData) {\n  const rootFrame = args.object as Frame;\n  \n  rootFrame.on(\"androidOverflowInset\", (event: any) =\u003e {\n    const { inset } = event;\n    \n    // Store values for CSS variables\n    const values = { \n      top: inset.top, \n      bottom: inset.bottom, \n      left: inset.left, \n      right: inset.right \n    };\n    \n    // Mark as consumed (this should prevent padding, but doesn't)\n    inset.topConsumed = true;\n    inset.bottomConsumed = true;\n    inset.leftConsumed = true;\n    inset.rightConsumed = true;\n  });\n}\n```\n\n3. Run the app on an Android device/emulator\n4. Observe that padding is still applied automatically, even though insets are marked as consumed\n\n**Expected:** No padding should be applied when insets are marked as consumed.\n\n**Actual:** Padding is applied based on the original inset values.\n\n### Relevant log output (if applicable)\n\n```shell\nNo error messages, but the behavior can be observed visually as unwanted padding is applied to the view.\n```\n\n### Environment\n\n```yaml\nOS: Linux 6.17 Fedora Linux 43 (Workstation Edition)\nCPU: (20) x64 Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz\nShell: /usr/bin/zsh\nnode: 22.14.0\nnpm: 10.9.2\nnativescript: 9.0.1\n\n# android\njava: 17.0.16\nndk: Not Found\napis: Not Found\nbuild_tools: Not Found\nsystem_images: Not Found\n\n# ios\nxcode: Not Found\ncocoapods: Not Found\npython: 3.14.2\npython3: 3.14.2\nruby: 3.4.7\nplatforms: Not Found\n```\n\n### Dependencies\n\n```json\n\"dependencies\": {\n  \"@learn6502/6502\": \"workspace:^\",\n  \"@learn6502/common-ui\": \"workspace:^\",\n  \"@nativescript/core\": \"~9.0.10\",\n  \"@nativescript/localize\": \"^5.2.0\",\n  \"@nativescript/tailwind\": \"^4.0.7\",\n  \"tailwindcss\": \"^4.1.18\"\n},\n\"devDependencies\": {\n  \"@nativescript/android\": \"9.0.1\",\n  \"@nativescript/types\": \"~9.0.0\",\n  \"@nativescript/webpack\": \"^5.0.29\",\n  \"@tailwindcss/postcss\": \"^4.1.18\",\n  \"autoprefixer\": \"^10.4.23\",\n  \"nativescript\": \"^9.0.1\",\n  \"postcss\": \"^8.5.6\",\n  \"postcss-cli\": \"^11.0.1\",\n  \"postcss-discard-empty\": \"^7.0.1\",\n  \"postcss-import\": \"^16.1.1\",\n  \"postcss-nested\": \"^7.0.2\",\n  \"string-replace-loader\": \"^3.3.0\",\n  \"typescript\": \"^5.9.3\"\n}\n```\n\n### Please accept these terms\n\n- [x] I have searched the [existing issues](https://github.com/NativeScript/NativeScript/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before\n- [x] This is a bug report\n- [x] I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc)","author":{"url":"https://github.com/JumpLink","@type":"Person","name":"JumpLink"},"datePublished":"2025-12-31T12:29:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/11019/NativeScript/issues/11019"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:62ea1f52-52ec-2125-efeb-8ad2ca03f36c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9C7E:35369E:321150E:420C6AE:6964A165
html-safe-nonce64319632f3c43f13ccdc82b17e50ed8d3d9f6015375ddde62650e40fd04242d1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzdFOjM1MzY5RTozMjExNTBFOjQyMEM2QUU6Njk2NEExNjUiLCJ2aXNpdG9yX2lkIjoiMjA2MjkzODQwMzk1NzQxNjI5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1554a8452914b5a7d150ab26db3ffea493974c02d1dc2f483da2d8ddced810e6
hovercard-subject-tagissue:3772702975
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/11019/issue_layout
twitter:imagehttps://opengraph.githubassets.com/334531bf55aa2d1a193525253ae7c8db12916ef0ffa944d3bbaab0424e0097c9/NativeScript/NativeScript/issues/11019
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/334531bf55aa2d1a193525253ae7c8db12916ef0ffa944d3bbaab0424e0097c9/NativeScript/NativeScript/issues/11019
og:image:altIssue Description Bug: androidOverflowInset applies padding even when insets are marked as consumed When using androidOverflowEdge="dont-apply" and listening to the androidOverflowInset event, Nati...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJumpLink
hostnamegithub.com
expected-hostnamegithub.com
Nonebaa7d9900fdf7b27d604f36887af878d569cfbdcf97126832a5f4f0caf0c6ba5
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release842eff1d11f899d02b6b3b98fa3ea4860e64b34e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/11019#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F11019
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F11019
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/11019
Reloadhttps://github.com/NativeScript/NativeScript/issues/11019
Reloadhttps://github.com/NativeScript/NativeScript/issues/11019
NativeScript https://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Please reload this pagehttps://github.com/NativeScript/NativeScript/issues/11019
Notifications https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.4k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://github.com/NativeScript/NativeScript
Issues 866 https://github.com/NativeScript/NativeScript/issues
Pull requests 59 https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects 0 https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/NativeScript/NativeScript/security
Please reload this pagehttps://github.com/NativeScript/NativeScript/issues/11019
Insights https://github.com/NativeScript/NativeScript/pulse
Code https://github.com/NativeScript/NativeScript
Issues https://github.com/NativeScript/NativeScript/issues
Pull requests https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11019
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/11019
androidOverflowInset applies padding even when insets are marked as consumedhttps://github.com/NativeScript/NativeScript/issues/11019#top
bug-pending-triageReported bug, pending triage to confirm.https://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22bug-pending-triage%22
https://github.com/JumpLink
https://github.com/JumpLink
JumpLinkhttps://github.com/JumpLink
on Dec 31, 2025https://github.com/NativeScript/NativeScript/issues/11019#issue-3772702975
existing issueshttps://github.com/NativeScript/NativeScript/issues
StackOverflowhttps://stackoverflow.com/questions/tagged/nativescript
Code of Conducthttps://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc
bug-pending-triageReported bug, pending triage to confirm.https://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22bug-pending-triage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.