iOS: زر "رجوع" ينتقل إلى الموضع الخاطئ في قائمة المواضيع

The ‘back’ function in Safari/iOS (iPhone 8, latest iOS version) is unreliable; when going from the topic list to a topic, it will often not take you back to the correct position in the topic list. On my own forum this happens pretty much always. On Meta, it sometimes works for me, but more often it doesn’t. This happens both when clicking the ‘back’ button and when swiping to the right.

4 إعجابات

Out of curiosity does it work in safe mode ?

3 إعجابات

Sorry I forgot to mention that: I tested safe mode both on my own forum and here on Meta with the same result.

إعجاب واحد (1)

In the iOS hub app or in native mobile safari? I can’t repro any problem using the back button or back swipe from the topic list here on meta.

Do you have specific repro steps?

Oh wait, I can repro for back swipe, but not back button. Back swipe doesn’t seem to remember the actual scroll position in the topic list, but back button always does.

4 إعجابات

In native mobile safari. At first I had a hunch it was related to the topic list refreshing, but that doesn’t seem to be the case. It happens 100% of the time for me on Meta now.

Repro steps:

  • Log in to Meta
  • Reload the Meta homepage (this step doesn’t seem necessary but I wanted to rule out the topic list refresh issue)
  • Scroll one page down
  • Select a topic
  • Swipe right or click back

I also tried the following, all with the same result:

  • Disabled the Crystal ad blocker in content blocking.
  • Opened Meta in a private tab without logging in.
  • Tested on an iPhone SE.
  • Tested in Chrome on a Galaxy S6
5 إعجابات

That does seem to repro for me @eviltrout … perhaps we regressed here? @j.jaffeux?

6 إعجابات

This should fix it:

Details inside commit message, will wait for robin approval before merging this next week. Thanks for detailed report :+1:

11 إعجابًا

This is merged, let me know how it goes please.

6 إعجابات

تم إغلاق هذا الموضوع تلقائيًا بعد 3 أيام من آخر رد. لم يعد مسموحًا بإضافة ردود جديدة.

بعد مناقشة مع @bartv، قمت بالبحث أكثر واكتشفت أن هناك بالفعل تراجعًا.

أعتقد أن السبب يعود إلى:

بشكل أساسي، في هذه الحالة، scrollOnLoad غير معرف:
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/topic-list.js.es6#L71

أقترح الإصلاح التالي:

هل يمكنك مراجعته الأسبوع القادم يا @markvanlan؟

10 إعجابات

@bartv لقد دمجت الإصلاح الثاني، يرجى إخباري بالنتائج عندما يتوفر لديك وقت.

كإضافة جانبية، أتساءل عما إذا لم نتمكن من تحسين هذه المنطقية أكثر؟ حاليًا، يتم تخزين موضع موضوع واحد في كل تمرير للصفحة، ولكن خاصة على الأجهزة المحمولة، قد يعني ذلك أنه عند العودة، لن يكون الموضوع الذي نقرت عليه ضمن منطقة العرض، حتى لو لم يكن بعيدًا جدًا.

5 إعجابات

لقد جربت للتو هنا على Meta، لكنه لا يعمل بالنسبة لي - عند النقر على ‘رجوع’ من موضوع، أعود إلى أعلى قائمة المواضيع.

وأوافق تمامًا على العودة إلى الموضع الدقيق في قائمة المواضيع.

إنه يعمل معي، يرجى عمل فيديو عندما يكون لديك وقت.

إعجابَين (2)

لقد أضفتها إلى منشوري. أتمنى أن تساعد، وأخبرني إذا كنت بحاجة إلى تضمين أشياء أخرى.

إعجاب واحد (1)

ما يظهره الفيديو متوقع، فلم تقم بـ «تمرير الصفحة»، أي أنه لم يتم تحميل مواضيع إضافية، وبالتالي لم يتم تحديث موضع آخر موضوع تمت مشاهدته.

هذا ما اقترحته ملاحظتي الجانبية لتحسينه.

3 إعجابات

آه، يمكنني تأكيد أن الأمر يعمل فعلاً عندما أتحرك للأسفل بما يكفي لإجبار تحميل مواضيع جديدة. لم أتوقع هذا القيد - ك مستخدم، هذا أمر محير/غير متناسق قليلاً.

إعجاب واحد (1)

نعم، لا أحب ذلك كثيرًا أيضًا، ومن هنا اقترحت تحسينه. ولكن حسب علمي، هذا ليس تراجعًا مثل الأشياء الأخرى التي أصلحتها.

4 إعجابات

يا إلهي، كان هناك بالفعل انتكاسة أخرى من هذا الالتزام، وأعتقد أن هذا يجب أن يحلها:

ويُعيد السلوك الذي كنا نتحدث عنه!

6 إعجابات