Results 1 to 2 of 2

Thread: position: fixed on body prevents multi-page printing

    This duplicates another bug already reported in our system: EXTJS-25495
  1. #1
    Sencha User
    Join Date
    Jun 2017

    Default position: fixed on body prevents multi-page printing

    Hi all,

    With Sencha 6.5, I see that the theme-gray-all CSS file added a `position: fixed` CSS property to the main body tag (.x-viewport > .x-body). This causes problems for multi-page printing.

    I've created the following fiddle to illustrate the problem.

    1. In Chrome (it's easiest to see there - but I confirmed it's broken in FF too), click the Print button. Notice it says "1/1" in the number of pages that will be printed.
    2. Comment out the position: fixed line in the fiddle & Run the fiddle.
    3. Click the print button again. Notice that now you see "1/4" for the number of pages. This is correct.

    I haven't been able to find a solution around this problem that doesn't involve overriding the `position: fixed` property on the body - something I obviously don't want to do!

    Any suggestions on how to get around this problem?



  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia


    From a look at the comments in the code that particular piece (position: fixed) was related to an issue with virtual keyboards on mobile, so it seems safe to override if you're targetting desktop.

    I'll open a ticket to see if there's any harm in adding a print media rule setting it back to static.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha User
    Join Date
    Jun 2017

    Default Thanks!

    Excellent, thanks evant! Good idea on adding a print media rule override. I'll monitor the bug for updates.

Similar Threads

  1. Replies: 1
    Last Post: 22 Sep 2014, 12:15 PM
  2. Replies: 3
    Last Post: 6 Apr 2013, 2:36 AM
  3. Keep modal dialog fixed while page body scrolling?
    By rjanos in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 1 Apr 2009, 6:10 AM
  4. Grid prevents scrolling of page
    By J in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 31 May 2007, 3:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts