2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ext.Containerにscrollable:'vertical'したら長文の折り返しが画面外に行っちゃう罠

Last updated at Posted at 2013-07-22

ちょっとした文章を表示するContainerをExt.Containerを継承して作ってみたら、折り返しがおかしいっていう。

Ext.define('MyContainer', {
    extend: 'Ext.Container',
    xtype: 'agreement',
    config: {
        fullscreen: true,
        styleHtmlContent: true,
        scrollable: true,
        html: 'あいうおえかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん',
        items: [
            {
                docked: 'top',
                xtype: 'titlebar',
                title: 'ぶんしょ。'
            }
        ]
    }
});

こんな感じのを表示させると、AndroidのchromeとiOSのchrome, safariで折り返しがおかしくなる。PC用のchromeでも同じ現象。

scrollableを外すと期待した折り返しになるものの、今度はスクロールしない(当たり前)。で困ってググったら素敵な記事を発見。

SCSSを変更することで今回は解決。

.x-scroll-container {
  &>.x-inner {
    width: 100% !important;
  }
}

さて、もうひと頑張りしよう(´・ω・`)

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?