Sha256: df07d3eadad117e1f0331ca953fe6cb43bee7b3d59f52ea258afd59cb8b27c63

Contents?: true

Size: 611 Bytes

Versions: 4

Compression:

Stored size: 611 Bytes

Contents

module("SC.View - Keyboard support");

test("Views only attempt to call performKeyEquivalent on child views that support it", function() {
  var performKeyEquivalentCalled = 0;

  var view = SC.View.design({
    childViews: ['unsupported', 'supported'],

    unsupported: SC.CoreView,
    supported: SC.View.design({
      performKeyEquivalent: function(str) {
        performKeyEquivalentCalled++;
        return NO;
      }
    })
  });

  view = view.create();
  view.performKeyEquivalent("ctrl_r");
  
  ok(performKeyEquivalentCalled > 0, "performKeyEquivalent is called on the view that supports it");
});

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/keyboard.js