diff --git a/apps/student/build.gradle b/apps/student/build.gradle index f00a8e1d9c..ff77b65881 100644 --- a/apps/student/build.gradle +++ b/apps/student/build.gradle @@ -55,8 +55,8 @@ android { applicationId "com.instructure.candroid" minSdkVersion Versions.MIN_SDK targetSdkVersion Versions.TARGET_SDK - versionCode = 245 - versionName = '6.21.1' + versionCode = 246 + versionName = '6.21.2' vectorDrawables.useSupportLibrary = true multiDexEnabled = true diff --git a/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt b/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt index 42879dd2e3..f9ca978a8f 100644 --- a/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt +++ b/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt @@ -19,6 +19,7 @@ package com.instructure.student.fragment import android.os.Bundle import android.view.MenuItem import android.view.View +import android.view.ViewGroup import android.webkit.WebView import com.instructure.canvasapi2.managers.OAuthManager import com.instructure.canvasapi2.managers.PageManager @@ -125,6 +126,12 @@ class PageDetailsFragment : InternalWebviewFragment(), Bookmarkable { } } } + + val layoutParams = getCanvasWebView()?.layoutParams + layoutParams?.let { + it.height = ViewGroup.LayoutParams.WRAP_CONTENT + getCanvasWebView()?.layoutParams = it + } } override fun onOptionsItemSelected(item: MenuItem): Boolean { diff --git a/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt b/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt index 88abbe0d42..ccc687bb4c 100644 --- a/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt +++ b/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt @@ -158,6 +158,9 @@ class AssignmentDetailsView( override fun shouldLaunchInternalWebViewFragment(url: String): Boolean = true } + + descriptionWebViewWrapper.webView.focusable = View.NOT_FOCUSABLE + descriptionWebViewWrapper.webView.isFocusableInTouchMode = false } override fun render(state: AssignmentDetailsViewState) { diff --git a/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt b/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt index 47387a5de6..200ada6f85 100644 --- a/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt +++ b/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt @@ -61,6 +61,11 @@ class CanvasWebViewWrapper @JvmOverloads constructor( onThemeChanged(themeSwitched, html) } } + + val layoutParams = LinearLayout.LayoutParams(context, attrs) + val webViewLayoutParams = binding.contentWebView.layoutParams + webViewLayoutParams.height = layoutParams.height + binding.contentWebView.layoutParams = webViewLayoutParams } private fun changeButtonTheme() { diff --git a/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml b/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml index ea1053d57e..595291f683 100644 --- a/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml +++ b/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml @@ -63,8 +63,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/backgroundLightest" - android:focusable="false" - android:focusableInTouchMode="false" android:minHeight="48dp" android:scrollbars="none" />